1 .TH "modules.cpp" 3 "12 May 2005" "InspIRCd" \" -*- nroff -*-
9 \fC#include 'inspircd.h'\fP
11 \fC#include 'inspircd_io.h'\fP
13 \fC#include 'inspircd_util.h'\fP
15 \fC#include 'inspircd_config.h'\fP
17 \fC#include <unistd.h>\fP
19 \fC#include <fcntl.h>\fP
21 \fC#include <sys/errno.h>\fP
23 \fC#include <sys/ioctl.h>\fP
25 \fC#include <sys/utsname.h>\fP
27 \fC#include <cstdio>\fP
29 \fC#include <time.h>\fP
31 \fC#include <string>\fP
33 \fC#include <hash_map>\fP
37 \fC#include <sstream>\fP
39 \fC#include <vector>\fP
41 \fC#include <errno.h>\fP
43 \fC#include <deque>\fP
45 \fC#include <sched.h>\fP
47 \fC#include 'connection.h'\fP
49 \fC#include 'users.h'\fP
51 \fC#include 'servers.h'\fP
53 \fC#include 'ctables.h'\fP
55 \fC#include 'globals.h'\fP
57 \fC#include 'modules.h'\fP
59 \fC#include 'dynamic.h'\fP
61 \fC#include 'wildcard.h'\fP
63 \fC#include 'message.h'\fP
65 \fC#include 'mode.h'\fP
67 \fC#include 'xline.h'\fP
69 \fC#include 'commands.h'\fP
71 \fC#include 'inspstring.h'\fP
78 .RI "namespace \fBnspace\fP"
85 .RI "class \fBExtMode\fP"
88 .RI "struct \fBInAddr_HashComp\fP"
91 .RI "struct \fBStrHashComp\fP"
98 .RI "#define \fBnspace\fP std"
105 .RI "typedef nspace::hash_map< std::string, \fBuserrec\fP *, nspace::hash< string >, \fBStrHashComp\fP > \fBuser_hash\fP"
108 .RI "typedef nspace::hash_map< std::string, \fBchanrec\fP *, nspace::hash< string >, \fBStrHashComp\fP > \fBchan_hash\fP"
111 .RI "typedef nspace::hash_map< in_addr, string *, nspace::hash< in_addr >, \fBInAddr_HashComp\fP > \fBaddress_cache\fP"
114 .RI "typedef nspace::hash_map< std::string, \fBWhoWasUser\fP *, nspace::hash< string >, \fBStrHashComp\fP > \fBwhowas_hash\fP"
117 .RI "typedef std::deque< \fBcommand_t\fP > \fBcommand_table\fP"
120 .RI "typedef std::vector< \fBExtMode\fP > \fBExtModeList\fP"
123 .RI "typedef ExtModeList::iterator \fBExtModeListIter\fP"
130 .RI "bool \fBModeDefined\fP (char modechar, int type)"
133 .RI "bool \fBModeIsListMode\fP (char modechar, int type)"
136 .RI "bool \fBModeDefinedOper\fP (char modechar, int type)"
139 .RI "int \fBModeDefinedOn\fP (char modechar, int type)"
142 .RI "int \fBModeDefinedOff\fP (char modechar, int type)"
145 .RI "bool \fBDoAddExtendedMode\fP (char modechar, int type, bool requires_oper, int params_on, int params_off)"
148 .RI "void \fBModeMakeList\fP (char modechar)"
151 .RI "std::vector< \fBModule\fP * > \fBmodules\fP (255)"
154 .RI "std::vector< \fBircd_module\fP * > \fBfactory\fP (255)"
161 .RI "int \fBMODCOUNT\fP = -1"
164 .RI "std::vector< \fBModule\fP * > \fBmodules\fP"
167 .RI "std::vector< \fBircd_module\fP * > \fBfactory\fP"
170 .RI "time_t \fBTIME\fP"
173 .RI "int \fBLogLevel\fP"
176 .RI "char \fBServerName\fP [MAXBUF]"
179 .RI "char \fBNetwork\fP [MAXBUF]"
182 .RI "char \fBServerDesc\fP [MAXBUF]"
185 .RI "char \fBAdminName\fP [MAXBUF]"
188 .RI "char \fBAdminEmail\fP [MAXBUF]"
191 .RI "char \fBAdminNick\fP [MAXBUF]"
194 .RI "char \fBdiepass\fP [MAXBUF]"
197 .RI "char \fBrestartpass\fP [MAXBUF]"
200 .RI "char \fBmotd\fP [MAXBUF]"
203 .RI "char \fBrules\fP [MAXBUF]"
206 .RI "char \fBlist\fP [MAXBUF]"
209 .RI "char \fBPrefixQuit\fP [MAXBUF]"
212 .RI "char \fBDieValue\fP [MAXBUF]"
215 .RI "int \fBdebugging\fP"
218 .RI "int \fBWHOWAS_STALE\fP"
221 .RI "int \fBWHOWAS_MAX\fP"
224 .RI "int \fBDieDelay\fP"
227 .RI "time_t \fBstartup_time\fP"
230 .RI "int \fBNetBufferSize\fP"
233 .RI "int \fBMaxWhoResults\fP"
236 .RI "time_t \fBnb_start\fP"
239 .RI "std::vector< int > \fBfd_reap\fP"
242 .RI "std::vector< std::string > \fBmodule_names\fP"
245 .RI "int \fBboundPortCount\fP"
248 .RI "int \fBportCount\fP"
251 .RI "int \fBSERVERportCount\fP"
254 .RI "int \fBports\fP [MAXSOCKS]"
257 .RI "int \fBdefaultRoute\fP"
260 .RI "std::vector< long > \fBauth_cookies\fP"
263 .RI "std::stringstream \fBconfig_f\fP"
266 .RI "\fBserverrec\fP * \fBme\fP [32]"
269 .RI "FILE * \fBlog_file\fP"
272 .RI "\fBuserrec\fP * \fBfd_ref_table\fP [65536]"
275 .RI "\fBuser_hash\fP \fBclientlist\fP"
278 .RI "\fBchan_hash\fP \fBchanlist\fP"
281 .RI "\fBwhowas_hash\fP \fBwhowas\fP"
284 .RI "\fBcommand_table\fP \fBcmdlist\fP"
287 .RI "\fBfile_cache\fP \fBMOTD\fP"
290 .RI "\fBfile_cache\fP \fBRULES\fP"
293 .RI "\fBaddress_cache\fP \fBIP\fP"
296 .RI "\fBExtModeList\fP \fBEMode\fP"
299 .SH "Define Documentation"
301 .SS "#define nspace std"
303 Definition at line 64 of file modules.cpp.
304 .SH "Typedef Documentation"
306 .SS "typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, \fBInAddr_HashComp\fP> \fBaddress_cache\fP"
308 Definition at line 187 of file modules.cpp.
309 .SS "typedef nspace::hash_map<std::string, \fBchanrec\fP*, nspace::hash<string>, \fBStrHashComp\fP> \fBchan_hash\fP"
311 Definition at line 186 of file modules.cpp.
312 .SS "typedef std::deque<\fBcommand_t\fP> \fBcommand_table\fP"
314 Definition at line 189 of file modules.cpp.
315 .SS "typedef std::vector<\fBExtMode\fP> \fBExtModeList\fP"
317 Definition at line 215 of file modules.cpp.
318 .SS "typedef ExtModeList::iterator \fBExtModeListIter\fP"
320 Definition at line 216 of file modules.cpp.
322 Referenced by ModeDefined(), ModeDefinedOff(), ModeDefinedOn(), ModeDefinedOper(), ModeIsListMode(), and ModeMakeList().
323 .SS "typedef nspace::hash_map<std::string, \fBuserrec\fP*, nspace::hash<string>, \fBStrHashComp\fP> \fBuser_hash\fP"
325 Definition at line 185 of file modules.cpp.
326 .SS "typedef nspace::hash_map<std::string, \fBWhoWasUser\fP*, nspace::hash<string>, \fBStrHashComp\fP> \fBwhowas_hash\fP"
328 Definition at line 188 of file modules.cpp.
329 .SH "Function Documentation"
331 .SS "bool DoAddExtendedMode (char modechar, int type, bool requires_oper, int params_on, int params_off)"
333 Definition at line 285 of file modules.cpp.
335 References EMode, and ModeDefined().
337 Referenced by Server::AddExtendedListMode(), and Server::AddExtendedMode().
341 287 if (ModeDefined(modechar,type)) {
344 290 EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off));
348 .SS "std::vector<\fBircd_module\fP*> factory (255)"
350 .SS "bool ModeDefined (char modechar, int type)"
352 Definition at line 222 of file modules.cpp.
354 References EMode, and ExtModeListIter.
356 Referenced by DoAddExtendedMode().
360 224 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
362 226 if ((i->modechar == modechar) && (i->type == type))
370 .SS "int ModeDefinedOff (char modechar, int type)"
372 Definition at line 272 of file modules.cpp.
374 References EMode, and ExtModeListIter.
378 274 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
380 276 if ((i->modechar == modechar) && (i->type == type))
382 278 return i->params_when_off;
388 .SS "int ModeDefinedOn (char modechar, int type)"
390 Definition at line 259 of file modules.cpp.
392 References EMode, and ExtModeListIter.
396 261 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
398 263 if ((i->modechar == modechar) && (i->type == type))
400 265 return i->params_when_on;
406 .SS "bool ModeDefinedOper (char modechar, int type)"
408 Definition at line 246 of file modules.cpp.
410 References EMode, and ExtModeListIter.
414 248 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
416 250 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true))
424 .SS "bool ModeIsListMode (char modechar, int type)"
426 Definition at line 234 of file modules.cpp.
428 References EMode, and ExtModeListIter.
432 236 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
434 238 if ((i->modechar == modechar) && (i->type == type) && (i->list == true))
442 .SS "void ModeMakeList (char modechar)"
444 Definition at line 295 of file modules.cpp.
446 References EMode, ExtModeListIter, and MT_CHANNEL.
448 Referenced by Server::AddExtendedListMode().
452 297 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
454 299 if ((i->modechar == modechar) && (i->type == MT_CHANNEL))
463 .SS "std::vector<\fBModule\fP*> modules (255)"
465 .SH "Variable Documentation"
467 .SS "char \fBAdminEmail\fP[MAXBUF]"
469 Definition at line 84 of file modules.cpp.
470 .SS "char \fBAdminName\fP[MAXBUF]"
472 Definition at line 83 of file modules.cpp.
473 .SS "char \fBAdminNick\fP[MAXBUF]"
475 Definition at line 85 of file modules.cpp.
476 .SS "std::vector<long> \fBauth_cookies\fP"
478 Definition at line 112 of file modules.cpp.
479 .SS "int \fBboundPortCount\fP"
481 Definition at line 106 of file modules.cpp.
482 .SS "\fBchan_hash\fP \fBchanlist\fP"
484 Definition at line 193 of file modules.cpp.
485 .SS "\fBuser_hash\fP \fBclientlist\fP"
487 Definition at line 192 of file modules.cpp.
488 .SS "\fBcommand_table\fP \fBcmdlist\fP"
490 Definition at line 195 of file modules.cpp.
491 .SS "std::stringstream \fBconfig_f\fP"
493 Definition at line 113 of file modules.cpp.
494 .SS "int \fBdebugging\fP"
496 Definition at line 94 of file modules.cpp.
497 .SS "int \fBdefaultRoute\fP"
499 Definition at line 110 of file modules.cpp.
500 .SS "int \fBDieDelay\fP"
502 Definition at line 97 of file modules.cpp.
503 .SS "char \fBdiepass\fP[MAXBUF]"
505 Definition at line 86 of file modules.cpp.
506 .SS "char \fBDieValue\fP[MAXBUF]"
508 Definition at line 92 of file modules.cpp.
509 .SS "\fBExtModeList\fP \fBEMode\fP"
511 Definition at line 219 of file modules.cpp.
513 Referenced by DoAddExtendedMode(), ModeDefined(), ModeDefinedOff(), ModeDefinedOn(), ModeDefinedOper(), ModeIsListMode(), and ModeMakeList().
514 .SS "std::vector<\fBircd_module\fP*> factory"
516 Definition at line 75 of file modules.cpp.
517 .SS "std::vector<int> \fBfd_reap\fP"
519 Definition at line 103 of file modules.cpp.
520 .SS "\fBuserrec\fP* \fBfd_ref_table\fP[65536]"
522 Definition at line 119 of file modules.cpp.
524 Referenced by Server::FindDescriptor(), and Server::PseudoToUser().
525 .SS "\fBaddress_cache\fP \fBIP\fP"
527 Definition at line 198 of file modules.cpp.
528 .SS "char \fBlist\fP[MAXBUF]"
530 Definition at line 90 of file modules.cpp.
531 .SS "FILE* \fBlog_file\fP"
533 Definition at line 117 of file modules.cpp.
534 .SS "int \fBLogLevel\fP"
536 Definition at line 79 of file modules.cpp.
537 .SS "int \fBMaxWhoResults\fP"
539 Definition at line 100 of file modules.cpp.
540 .SS "\fBserverrec\fP* \fBme\fP[32]"
542 Definition at line 115 of file modules.cpp.
543 .SS "int \fBMODCOUNT\fP = -1"
545 Definition at line 1067 of file modules.cpp.
546 .SS "std::vector<std::string> \fBmodule_names\fP"
548 Definition at line 104 of file modules.cpp.
549 .SS "std::vector<\fBModule\fP*> modules"
551 Definition at line 74 of file modules.cpp.
552 .SS "\fBfile_cache\fP \fBMOTD\fP"
554 Definition at line 196 of file modules.cpp.
555 .SS "char \fBmotd\fP[MAXBUF]"
557 Definition at line 88 of file modules.cpp.
558 .SS "time_t \fBnb_start\fP"
560 Definition at line 101 of file modules.cpp.
561 .SS "int \fBNetBufferSize\fP"
563 Definition at line 99 of file modules.cpp.
564 .SS "char \fBNetwork\fP[MAXBUF]"
566 Definition at line 81 of file modules.cpp.
567 .SS "int \fBportCount\fP"
569 Definition at line 107 of file modules.cpp.
570 .SS "int \fBports\fP[MAXSOCKS]"
572 Definition at line 109 of file modules.cpp.
573 .SS "char \fBPrefixQuit\fP[MAXBUF]"
575 Definition at line 91 of file modules.cpp.
576 .SS "char \fBrestartpass\fP[MAXBUF]"
578 Definition at line 87 of file modules.cpp.
579 .SS "\fBfile_cache\fP \fBRULES\fP"
581 Definition at line 197 of file modules.cpp.
582 .SS "char \fBrules\fP[MAXBUF]"
584 Definition at line 89 of file modules.cpp.
585 .SS "char \fBServerDesc\fP[MAXBUF]"
587 Definition at line 82 of file modules.cpp.
588 .SS "char \fBServerName\fP[MAXBUF]"
590 Definition at line 80 of file modules.cpp.
591 .SS "int \fBSERVERportCount\fP"
593 Definition at line 108 of file modules.cpp.
594 .SS "time_t \fBstartup_time\fP"
596 Definition at line 98 of file modules.cpp.
597 .SS "time_t \fBTIME\fP"
599 Definition at line 77 of file modules.cpp.
600 .SS "\fBwhowas_hash\fP \fBwhowas\fP"
602 Definition at line 194 of file modules.cpp.
603 .SS "int \fBWHOWAS_MAX\fP"
605 Definition at line 96 of file modules.cpp.
606 .SS "int \fBWHOWAS_STALE\fP"
608 Definition at line 95 of file modules.cpp.
611 Generated automatically by Doxygen for InspIRCd from the source code.