1 .TH "modules.cpp" 3 "28 Mar 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 std::deque< \fBcommand_t\fP > \fBcommand_table\fP"
117 .RI "typedef std::vector< \fBExtMode\fP > \fBExtModeList\fP"
120 .RI "typedef ExtModeList::iterator \fBExtModeListIter\fP"
127 .RI "bool \fBModeDefined\fP (char modechar, int type)"
130 .RI "bool \fBModeIsListMode\fP (char modechar, int type)"
133 .RI "bool \fBModeDefinedOper\fP (char modechar, int type)"
136 .RI "int \fBModeDefinedOn\fP (char modechar, int type)"
139 .RI "int \fBModeDefinedOff\fP (char modechar, int type)"
142 .RI "bool \fBDoAddExtendedMode\fP (char modechar, int type, bool requires_oper, int params_on, int params_off)"
145 .RI "void \fBModeMakeList\fP (char modechar)"
148 .RI "std::vector< \fBModule\fP * > \fBmodules\fP (255)"
151 .RI "std::vector< \fBircd_module\fP * > \fBfactory\fP (255)"
158 .RI "int \fBMODCOUNT\fP = -1"
161 .RI "std::vector< \fBModule\fP * > \fBmodules\fP"
164 .RI "std::vector< \fBircd_module\fP * > \fBfactory\fP"
167 .RI "int \fBLogLevel\fP"
170 .RI "char \fBServerName\fP [MAXBUF]"
173 .RI "char \fBNetwork\fP [MAXBUF]"
176 .RI "char \fBServerDesc\fP [MAXBUF]"
179 .RI "char \fBAdminName\fP [MAXBUF]"
182 .RI "char \fBAdminEmail\fP [MAXBUF]"
185 .RI "char \fBAdminNick\fP [MAXBUF]"
188 .RI "char \fBdiepass\fP [MAXBUF]"
191 .RI "char \fBrestartpass\fP [MAXBUF]"
194 .RI "char \fBmotd\fP [MAXBUF]"
197 .RI "char \fBrules\fP [MAXBUF]"
200 .RI "char \fBlist\fP [MAXBUF]"
203 .RI "char \fBPrefixQuit\fP [MAXBUF]"
206 .RI "char \fBDieValue\fP [MAXBUF]"
209 .RI "int \fBdebugging\fP"
212 .RI "int \fBWHOWAS_STALE\fP"
215 .RI "int \fBWHOWAS_MAX\fP"
218 .RI "int \fBDieDelay\fP"
221 .RI "time_t \fBstartup_time\fP"
224 .RI "int \fBNetBufferSize\fP"
227 .RI "int \fBMaxWhoResults\fP"
230 .RI "time_t \fBnb_start\fP"
233 .RI "std::vector< int > \fBfd_reap\fP"
236 .RI "std::vector< std::string > \fBmodule_names\fP"
239 .RI "int \fBboundPortCount\fP"
242 .RI "int \fBportCount\fP"
245 .RI "int \fBUDPportCount\fP"
248 .RI "int \fBports\fP [MAXSOCKS]"
251 .RI "int \fBdefaultRoute\fP"
254 .RI "std::vector< long > \fBauth_cookies\fP"
257 .RI "std::stringstream \fBconfig_f\fP"
260 .RI "\fBserverrec\fP * \fBme\fP [32]"
263 .RI "FILE * \fBlog_file\fP"
266 .RI "\fBuser_hash\fP \fBclientlist\fP"
269 .RI "\fBchan_hash\fP \fBchanlist\fP"
272 .RI "\fBuser_hash\fP \fBwhowas\fP"
275 .RI "\fBcommand_table\fP \fBcmdlist\fP"
278 .RI "\fBfile_cache\fP \fBMOTD\fP"
281 .RI "\fBfile_cache\fP \fBRULES\fP"
284 .RI "\fBaddress_cache\fP \fBIP\fP"
287 .RI "\fBExtModeList\fP \fBEMode\fP"
290 .SH "Define Documentation"
292 .SS "#define nspace std"
294 Definition at line 59 of file modules.cpp.
295 .SH "Typedef Documentation"
297 .SS "typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, \fBInAddr_HashComp\fP> \fBaddress_cache\fP"
299 Definition at line 173 of file modules.cpp.
300 .SS "typedef nspace::hash_map<std::string, \fBchanrec\fP*, nspace::hash<string>, \fBStrHashComp\fP> \fBchan_hash\fP"
302 Definition at line 172 of file modules.cpp.
303 .SS "typedef std::deque<\fBcommand_t\fP> \fBcommand_table\fP"
305 Definition at line 174 of file modules.cpp.
306 .SS "typedef std::vector<\fBExtMode\fP> \fBExtModeList\fP"
308 Definition at line 200 of file modules.cpp.
309 .SS "typedef ExtModeList::iterator \fBExtModeListIter\fP"
311 Definition at line 201 of file modules.cpp.
313 Referenced by ModeDefined(), ModeDefinedOff(), ModeDefinedOn(), ModeDefinedOper(), ModeIsListMode(), and ModeMakeList().
314 .SS "typedef nspace::hash_map<std::string, \fBuserrec\fP*, nspace::hash<string>, \fBStrHashComp\fP> \fBuser_hash\fP"
316 Definition at line 171 of file modules.cpp.
317 .SH "Function Documentation"
319 .SS "bool DoAddExtendedMode (char modechar, int type, bool requires_oper, int params_on, int params_off)"
321 Definition at line 273 of file modules.cpp.
323 References EMode, and ModeDefined().
325 Referenced by Server::AddExtendedListMode(), and Server::AddExtendedMode().
329 275 if (ModeDefined(modechar,type)) {
332 278 EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off));
336 .SS "std::vector<\fBircd_module\fP*> factory (255)"
338 .SS "bool ModeDefined (char modechar, int type)"
340 Definition at line 207 of file modules.cpp.
342 References DEBUG, EMode, and ExtModeListIter.
344 Referenced by DoAddExtendedMode().
348 209 log(DEBUG,'Size of extmodes vector is %d',EMode.size());
349 210 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
351 212 if ((i->modechar == modechar) && (i->type == type))
359 .SS "int ModeDefinedOff (char modechar, int type)"
361 Definition at line 260 of file modules.cpp.
363 References EMode, and ExtModeListIter.
367 262 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
369 264 if ((i->modechar == modechar) && (i->type == type))
371 266 return i->params_when_off;
377 .SS "int ModeDefinedOn (char modechar, int type)"
379 Definition at line 247 of file modules.cpp.
381 References EMode, and ExtModeListIter.
385 249 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
387 251 if ((i->modechar == modechar) && (i->type == type))
389 253 return i->params_when_on;
395 .SS "bool ModeDefinedOper (char modechar, int type)"
397 Definition at line 233 of file modules.cpp.
399 References DEBUG, EMode, and ExtModeListIter.
403 235 log(DEBUG,'Size of extmodes vector is %d',EMode.size());
404 236 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
406 238 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true))
414 .SS "bool ModeIsListMode (char modechar, int type)"
416 Definition at line 220 of file modules.cpp.
418 References DEBUG, EMode, and ExtModeListIter.
422 222 log(DEBUG,'Size of extmodes vector is %d',EMode.size());
423 223 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
425 225 if ((i->modechar == modechar) && (i->type == type) && (i->list == true))
433 .SS "void ModeMakeList (char modechar)"
435 Definition at line 283 of file modules.cpp.
437 References EMode, ExtModeListIter, and MT_CHANNEL.
439 Referenced by Server::AddExtendedListMode().
443 285 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
445 287 if ((i->modechar == modechar) && (i->type == MT_CHANNEL))
454 .SS "std::vector<\fBModule\fP*> modules (255)"
456 .SH "Variable Documentation"
458 .SS "char \fBAdminEmail\fP[MAXBUF]"
460 Definition at line 73 of file modules.cpp.
461 .SS "char \fBAdminName\fP[MAXBUF]"
463 Definition at line 72 of file modules.cpp.
464 .SS "char \fBAdminNick\fP[MAXBUF]"
466 Definition at line 74 of file modules.cpp.
467 .SS "std::vector<long> \fBauth_cookies\fP"
469 Definition at line 101 of file modules.cpp.
470 .SS "int \fBboundPortCount\fP"
472 Definition at line 95 of file modules.cpp.
473 .SS "\fBchan_hash\fP \fBchanlist\fP"
475 Definition at line 178 of file modules.cpp.
476 .SS "\fBuser_hash\fP \fBclientlist\fP"
478 Definition at line 177 of file modules.cpp.
480 Referenced by Server::GetUsers().
481 .SS "\fBcommand_table\fP \fBcmdlist\fP"
483 Definition at line 180 of file modules.cpp.
484 .SS "std::stringstream \fBconfig_f\fP"
486 Definition at line 102 of file modules.cpp.
487 .SS "int \fBdebugging\fP"
489 Definition at line 83 of file modules.cpp.
490 .SS "int \fBdefaultRoute\fP"
492 Definition at line 99 of file modules.cpp.
493 .SS "int \fBDieDelay\fP"
495 Definition at line 86 of file modules.cpp.
496 .SS "char \fBdiepass\fP[MAXBUF]"
498 Definition at line 75 of file modules.cpp.
499 .SS "char \fBDieValue\fP[MAXBUF]"
501 Definition at line 81 of file modules.cpp.
502 .SS "\fBExtModeList\fP \fBEMode\fP"
504 Definition at line 204 of file modules.cpp.
506 Referenced by DoAddExtendedMode(), ModeDefined(), ModeDefinedOff(), ModeDefinedOn(), ModeDefinedOper(), ModeIsListMode(), and ModeMakeList().
507 .SS "std::vector<\fBircd_module\fP*> factory"
509 Definition at line 66 of file modules.cpp.
510 .SS "std::vector<int> \fBfd_reap\fP"
512 Definition at line 92 of file modules.cpp.
513 .SS "\fBaddress_cache\fP \fBIP\fP"
515 Definition at line 183 of file modules.cpp.
516 .SS "char \fBlist\fP[MAXBUF]"
518 Definition at line 79 of file modules.cpp.
519 .SS "FILE* \fBlog_file\fP"
521 Definition at line 106 of file modules.cpp.
522 .SS "int \fBLogLevel\fP"
524 Definition at line 68 of file modules.cpp.
525 .SS "int \fBMaxWhoResults\fP"
527 Definition at line 89 of file modules.cpp.
528 .SS "\fBserverrec\fP* \fBme\fP[32]"
530 Definition at line 104 of file modules.cpp.
531 .SS "int \fBMODCOUNT\fP = -1"
533 Definition at line 773 of file modules.cpp.
534 .SS "std::vector<std::string> \fBmodule_names\fP"
536 Definition at line 93 of file modules.cpp.
537 .SS "std::vector<\fBModule\fP*> modules"
539 Definition at line 65 of file modules.cpp.
540 .SS "\fBfile_cache\fP \fBMOTD\fP"
542 Definition at line 181 of file modules.cpp.
543 .SS "char \fBmotd\fP[MAXBUF]"
545 Definition at line 77 of file modules.cpp.
546 .SS "time_t \fBnb_start\fP"
548 Definition at line 90 of file modules.cpp.
549 .SS "int \fBNetBufferSize\fP"
551 Definition at line 88 of file modules.cpp.
552 .SS "char \fBNetwork\fP[MAXBUF]"
554 Definition at line 70 of file modules.cpp.
555 .SS "int \fBportCount\fP"
557 Definition at line 96 of file modules.cpp.
558 .SS "int \fBports\fP[MAXSOCKS]"
560 Definition at line 98 of file modules.cpp.
561 .SS "char \fBPrefixQuit\fP[MAXBUF]"
563 Definition at line 80 of file modules.cpp.
564 .SS "char \fBrestartpass\fP[MAXBUF]"
566 Definition at line 76 of file modules.cpp.
567 .SS "\fBfile_cache\fP \fBRULES\fP"
569 Definition at line 182 of file modules.cpp.
570 .SS "char \fBrules\fP[MAXBUF]"
572 Definition at line 78 of file modules.cpp.
573 .SS "char \fBServerDesc\fP[MAXBUF]"
575 Definition at line 71 of file modules.cpp.
576 .SS "char \fBServerName\fP[MAXBUF]"
578 Definition at line 69 of file modules.cpp.
579 .SS "time_t \fBstartup_time\fP"
581 Definition at line 87 of file modules.cpp.
582 .SS "int \fBUDPportCount\fP"
584 Definition at line 97 of file modules.cpp.
585 .SS "\fBuser_hash\fP \fBwhowas\fP"
587 Definition at line 179 of file modules.cpp.
588 .SS "int \fBWHOWAS_MAX\fP"
590 Definition at line 85 of file modules.cpp.
591 .SS "int \fBWHOWAS_STALE\fP"
593 Definition at line 84 of file modules.cpp.
596 Generated automatically by Doxygen for InspIRCd from the source code.