]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/man/man3/modules.cpp.3
Documentation update
[user/henk/code/inspircd.git] / docs / man / man3 / modules.cpp.3
1 .TH "modules.cpp" 3 "25 Mar 2005" "InspIRCd" \" -*- nroff -*-
2 .ad l
3 .nh
4 .SH NAME
5 modules.cpp \- 
6 .SH SYNOPSIS
7 .br
8 .PP
9 \fC#include 'inspircd.h'\fP
10 .br
11 \fC#include 'inspircd_io.h'\fP
12 .br
13 \fC#include 'inspircd_util.h'\fP
14 .br
15 \fC#include 'inspircd_config.h'\fP
16 .br
17 \fC#include <unistd.h>\fP
18 .br
19 \fC#include <fcntl.h>\fP
20 .br
21 \fC#include <sys/errno.h>\fP
22 .br
23 \fC#include <sys/ioctl.h>\fP
24 .br
25 \fC#include <sys/utsname.h>\fP
26 .br
27 \fC#include <cstdio>\fP
28 .br
29 \fC#include <time.h>\fP
30 .br
31 \fC#include <string>\fP
32 .br
33 \fC#include <hash_map>\fP
34 .br
35 \fC#include <map>\fP
36 .br
37 \fC#include <sstream>\fP
38 .br
39 \fC#include <vector>\fP
40 .br
41 \fC#include <errno.h>\fP
42 .br
43 \fC#include <deque>\fP
44 .br
45 \fC#include <sched.h>\fP
46 .br
47 \fC#include 'connection.h'\fP
48 .br
49 \fC#include 'users.h'\fP
50 .br
51 \fC#include 'servers.h'\fP
52 .br
53 \fC#include 'ctables.h'\fP
54 .br
55 \fC#include 'globals.h'\fP
56 .br
57 \fC#include 'modules.h'\fP
58 .br
59 \fC#include 'dynamic.h'\fP
60 .br
61 \fC#include 'wildcard.h'\fP
62 .br
63 \fC#include 'message.h'\fP
64 .br
65 \fC#include 'mode.h'\fP
66 .br
67 \fC#include 'xline.h'\fP
68 .br
69 \fC#include 'commands.h'\fP
70 .br
71
72 .SS "Namespaces"
73
74 .in +1c
75 .ti -1c
76 .RI "namespace \fBnspace\fP"
77 .br
78 .in -1c
79 .SS "Compounds"
80
81 .in +1c
82 .ti -1c
83 .RI "class \fBExtMode\fP"
84 .br
85 .ti -1c
86 .RI "struct \fBInAddr_HashComp\fP"
87 .br
88 .ti -1c
89 .RI "struct \fBStrHashComp\fP"
90 .br
91 .in -1c
92 .SS "Defines"
93
94 .in +1c
95 .ti -1c
96 .RI "#define \fBnspace\fP   std"
97 .br
98 .in -1c
99 .SS "Typedefs"
100
101 .in +1c
102 .ti -1c
103 .RI "typedef nspace::hash_map< std::string, \fBuserrec\fP *, nspace::hash< string >, \fBStrHashComp\fP > \fBuser_hash\fP"
104 .br
105 .ti -1c
106 .RI "typedef nspace::hash_map< std::string, \fBchanrec\fP *, nspace::hash< string >, \fBStrHashComp\fP > \fBchan_hash\fP"
107 .br
108 .ti -1c
109 .RI "typedef nspace::hash_map< in_addr, string *, nspace::hash< in_addr >, \fBInAddr_HashComp\fP > \fBaddress_cache\fP"
110 .br
111 .ti -1c
112 .RI "typedef std::deque< \fBcommand_t\fP > \fBcommand_table\fP"
113 .br
114 .ti -1c
115 .RI "typedef std::vector< \fBExtMode\fP > \fBExtModeList\fP"
116 .br
117 .ti -1c
118 .RI "typedef ExtModeList::iterator \fBExtModeListIter\fP"
119 .br
120 .in -1c
121 .SS "Functions"
122
123 .in +1c
124 .ti -1c
125 .RI "bool \fBModeDefined\fP (char modechar, int type)"
126 .br
127 .ti -1c
128 .RI "bool \fBModeIsListMode\fP (char modechar, int type)"
129 .br
130 .ti -1c
131 .RI "bool \fBModeDefinedOper\fP (char modechar, int type)"
132 .br
133 .ti -1c
134 .RI "int \fBModeDefinedOn\fP (char modechar, int type)"
135 .br
136 .ti -1c
137 .RI "int \fBModeDefinedOff\fP (char modechar, int type)"
138 .br
139 .ti -1c
140 .RI "bool \fBDoAddExtendedMode\fP (char modechar, int type, bool requires_oper, int params_on, int params_off)"
141 .br
142 .ti -1c
143 .RI "void \fBModeMakeList\fP (char modechar)"
144 .br
145 .ti -1c
146 .RI "std::vector< \fBModule\fP * > \fBmodules\fP (255)"
147 .br
148 .ti -1c
149 .RI "std::vector< \fBircd_module\fP * > \fBfactory\fP (255)"
150 .br
151 .in -1c
152 .SS "Variables"
153
154 .in +1c
155 .ti -1c
156 .RI "int \fBMODCOUNT\fP = -1"
157 .br
158 .ti -1c
159 .RI "vector< \fBModule\fP * > \fBmodules\fP"
160 .br
161 .ti -1c
162 .RI "vector< \fBircd_module\fP * > \fBfactory\fP"
163 .br
164 .ti -1c
165 .RI "int \fBLogLevel\fP"
166 .br
167 .ti -1c
168 .RI "char \fBServerName\fP [MAXBUF]"
169 .br
170 .ti -1c
171 .RI "char \fBNetwork\fP [MAXBUF]"
172 .br
173 .ti -1c
174 .RI "char \fBServerDesc\fP [MAXBUF]"
175 .br
176 .ti -1c
177 .RI "char \fBAdminName\fP [MAXBUF]"
178 .br
179 .ti -1c
180 .RI "char \fBAdminEmail\fP [MAXBUF]"
181 .br
182 .ti -1c
183 .RI "char \fBAdminNick\fP [MAXBUF]"
184 .br
185 .ti -1c
186 .RI "char \fBdiepass\fP [MAXBUF]"
187 .br
188 .ti -1c
189 .RI "char \fBrestartpass\fP [MAXBUF]"
190 .br
191 .ti -1c
192 .RI "char \fBmotd\fP [MAXBUF]"
193 .br
194 .ti -1c
195 .RI "char \fBrules\fP [MAXBUF]"
196 .br
197 .ti -1c
198 .RI "char \fBlist\fP [MAXBUF]"
199 .br
200 .ti -1c
201 .RI "char \fBPrefixQuit\fP [MAXBUF]"
202 .br
203 .ti -1c
204 .RI "char \fBDieValue\fP [MAXBUF]"
205 .br
206 .ti -1c
207 .RI "int \fBdebugging\fP"
208 .br
209 .ti -1c
210 .RI "int \fBWHOWAS_STALE\fP"
211 .br
212 .ti -1c
213 .RI "int \fBWHOWAS_MAX\fP"
214 .br
215 .ti -1c
216 .RI "int \fBDieDelay\fP"
217 .br
218 .ti -1c
219 .RI "time_t \fBstartup_time\fP"
220 .br
221 .ti -1c
222 .RI "int \fBNetBufferSize\fP"
223 .br
224 .ti -1c
225 .RI "int \fBMaxWhoResults\fP"
226 .br
227 .ti -1c
228 .RI "time_t \fBnb_start\fP"
229 .br
230 .ti -1c
231 .RI "std::vector< int > \fBfd_reap\fP"
232 .br
233 .ti -1c
234 .RI "std::vector< std::string > \fBmodule_names\fP"
235 .br
236 .ti -1c
237 .RI "int \fBboundPortCount\fP"
238 .br
239 .ti -1c
240 .RI "int \fBportCount\fP"
241 .br
242 .ti -1c
243 .RI "int \fBUDPportCount\fP"
244 .br
245 .ti -1c
246 .RI "int \fBports\fP [MAXSOCKS]"
247 .br
248 .ti -1c
249 .RI "int \fBdefaultRoute\fP"
250 .br
251 .ti -1c
252 .RI "std::vector< long > \fBauth_cookies\fP"
253 .br
254 .ti -1c
255 .RI "std::stringstream \fBconfig_f\fP"
256 .br
257 .ti -1c
258 .RI "\fBserverrec\fP * \fBme\fP [32]"
259 .br
260 .ti -1c
261 .RI "FILE * \fBlog_file\fP"
262 .br
263 .ti -1c
264 .RI "\fBuser_hash\fP \fBclientlist\fP"
265 .br
266 .ti -1c
267 .RI "\fBchan_hash\fP \fBchanlist\fP"
268 .br
269 .ti -1c
270 .RI "\fBuser_hash\fP \fBwhowas\fP"
271 .br
272 .ti -1c
273 .RI "\fBcommand_table\fP \fBcmdlist\fP"
274 .br
275 .ti -1c
276 .RI "\fBfile_cache\fP \fBMOTD\fP"
277 .br
278 .ti -1c
279 .RI "\fBfile_cache\fP \fBRULES\fP"
280 .br
281 .ti -1c
282 .RI "\fBaddress_cache\fP \fBIP\fP"
283 .br
284 .ti -1c
285 .RI "\fBExtModeList\fP \fBEMode\fP"
286 .br
287 .in -1c
288 .SH "Define Documentation"
289 .PP 
290 .SS "#define nspace   std"
291 .PP
292 Definition at line 58 of file modules.cpp.
293 .SH "Typedef Documentation"
294 .PP 
295 .SS "typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, \fBInAddr_HashComp\fP> \fBaddress_cache\fP"
296 .PP
297 Definition at line 166 of file modules.cpp.
298 .SS "typedef nspace::hash_map<std::string, \fBchanrec\fP*, nspace::hash<string>, \fBStrHashComp\fP> \fBchan_hash\fP"
299 .PP
300 Definition at line 165 of file modules.cpp.
301 .SS "typedef std::deque<\fBcommand_t\fP> \fBcommand_table\fP"
302 .PP
303 Definition at line 167 of file modules.cpp.
304 .SS "typedef std::vector<\fBExtMode\fP> \fBExtModeList\fP"
305 .PP
306 Definition at line 193 of file modules.cpp.
307 .SS "typedef ExtModeList::iterator \fBExtModeListIter\fP"
308 .PP
309 Definition at line 194 of file modules.cpp.
310 .PP
311 Referenced by ModeDefined(), ModeDefinedOff(), ModeDefinedOn(), ModeDefinedOper(), ModeIsListMode(), and ModeMakeList().
312 .SS "typedef nspace::hash_map<std::string, \fBuserrec\fP*, nspace::hash<string>, \fBStrHashComp\fP> \fBuser_hash\fP"
313 .PP
314 Definition at line 164 of file modules.cpp.
315 .SH "Function Documentation"
316 .PP 
317 .SS "bool DoAddExtendedMode (char modechar, int type, bool requires_oper, int params_on, int params_off)"
318 .PP
319 Definition at line 266 of file modules.cpp.
320 .PP
321 References EMode, and ModeDefined().
322 .PP
323 Referenced by Server::AddExtendedListMode(), and Server::AddExtendedMode().
324 .PP
325 .nf
326 267 {
327 268         if (ModeDefined(modechar,type)) {
328 269                 return false;
329 270         }
330 271         EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off));
331 272         return true;
332 273 }
333 .fi
334 .SS "std::vector<\fBircd_module\fP*> factory (255)"
335 .PP
336 .SS "bool ModeDefined (char modechar, int type)"
337 .PP
338 Definition at line 200 of file modules.cpp.
339 .PP
340 References DEBUG, EMode, and ExtModeListIter.
341 .PP
342 Referenced by DoAddExtendedMode().
343 .PP
344 .nf
345 201 {
346 202         log(DEBUG,'Size of extmodes vector is %d',EMode.size());
347 203         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
348 204         {
349 205                 if ((i->modechar == modechar) && (i->type == type))
350 206                 {
351 207                         return true;
352 208                 }
353 209         }
354 210         return false;
355 211 }
356 .fi
357 .SS "int ModeDefinedOff (char modechar, int type)"
358 .PP
359 Definition at line 253 of file modules.cpp.
360 .PP
361 References EMode, and ExtModeListIter.
362 .PP
363 .nf
364 254 {
365 255         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
366 256         {
367 257                 if ((i->modechar == modechar) && (i->type == type))
368 258                 {
369 259                         return i->params_when_off;
370 260                 }
371 261         }
372 262         return 0;
373 263 }
374 .fi
375 .SS "int ModeDefinedOn (char modechar, int type)"
376 .PP
377 Definition at line 240 of file modules.cpp.
378 .PP
379 References EMode, and ExtModeListIter.
380 .PP
381 .nf
382 241 {
383 242         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
384 243         {
385 244                 if ((i->modechar == modechar) && (i->type == type))
386 245                 {
387 246                         return i->params_when_on;
388 247                 }
389 248         }
390 249         return 0;
391 250 }
392 .fi
393 .SS "bool ModeDefinedOper (char modechar, int type)"
394 .PP
395 Definition at line 226 of file modules.cpp.
396 .PP
397 References DEBUG, EMode, and ExtModeListIter.
398 .PP
399 .nf
400 227 {
401 228         log(DEBUG,'Size of extmodes vector is %d',EMode.size());
402 229         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
403 230         {
404 231                 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true))
405 232                 {
406 233                         return true;
407 234                 }
408 235         }
409 236         return false;
410 237 }
411 .fi
412 .SS "bool ModeIsListMode (char modechar, int type)"
413 .PP
414 Definition at line 213 of file modules.cpp.
415 .PP
416 References DEBUG, EMode, and ExtModeListIter.
417 .PP
418 .nf
419 214 {
420 215         log(DEBUG,'Size of extmodes vector is %d',EMode.size());
421 216         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
422 217         {
423 218                 if ((i->modechar == modechar) && (i->type == type) && (i->list == true))
424 219                 {
425 220                         return true;
426 221                 }
427 222         }
428 223         return false;
429 224 }
430 .fi
431 .SS "void ModeMakeList (char modechar)"
432 .PP
433 Definition at line 276 of file modules.cpp.
434 .PP
435 References EMode, ExtModeListIter, and MT_CHANNEL.
436 .PP
437 Referenced by Server::AddExtendedListMode().
438 .PP
439 .nf
440 277 {
441 278         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
442 279         {
443 280                 if ((i->modechar == modechar) && (i->type == MT_CHANNEL))
444 281                 {
445 282                         i->list = true;
446 283                         return;
447 284                 }
448 285         }
449 286         return;
450 287 }
451 .fi
452 .SS "std::vector<\fBModule\fP*> modules (255)"
453 .PP
454 .SH "Variable Documentation"
455 .PP 
456 .SS "char \fBAdminEmail\fP[MAXBUF]"
457 .PP
458 Definition at line 72 of file modules.cpp.
459 .SS "char \fBAdminName\fP[MAXBUF]"
460 .PP
461 Definition at line 71 of file modules.cpp.
462 .SS "char \fBAdminNick\fP[MAXBUF]"
463 .PP
464 Definition at line 73 of file modules.cpp.
465 .SS "std::vector<long> \fBauth_cookies\fP"
466 .PP
467 Definition at line 100 of file modules.cpp.
468 .SS "int \fBboundPortCount\fP"
469 .PP
470 Definition at line 94 of file modules.cpp.
471 .SS "\fBchan_hash\fP \fBchanlist\fP"
472 .PP
473 Definition at line 171 of file modules.cpp.
474 .SS "\fBuser_hash\fP \fBclientlist\fP"
475 .PP
476 Definition at line 170 of file modules.cpp.
477 .PP
478 Referenced by Server::GetUsers().
479 .SS "\fBcommand_table\fP \fBcmdlist\fP"
480 .PP
481 Definition at line 173 of file modules.cpp.
482 .SS "std::stringstream \fBconfig_f\fP"
483 .PP
484 Definition at line 101 of file modules.cpp.
485 .SS "int \fBdebugging\fP"
486 .PP
487 Definition at line 82 of file modules.cpp.
488 .SS "int \fBdefaultRoute\fP"
489 .PP
490 Definition at line 98 of file modules.cpp.
491 .SS "int \fBDieDelay\fP"
492 .PP
493 Definition at line 85 of file modules.cpp.
494 .SS "char \fBdiepass\fP[MAXBUF]"
495 .PP
496 Definition at line 74 of file modules.cpp.
497 .SS "char \fBDieValue\fP[MAXBUF]"
498 .PP
499 Definition at line 80 of file modules.cpp.
500 .SS "\fBExtModeList\fP \fBEMode\fP"
501 .PP
502 Definition at line 197 of file modules.cpp.
503 .PP
504 Referenced by DoAddExtendedMode(), ModeDefined(), ModeDefinedOff(), ModeDefinedOn(), ModeDefinedOper(), ModeIsListMode(), and ModeMakeList().
505 .SS "vector<\fBircd_module\fP*> factory"
506 .PP
507 Definition at line 65 of file modules.cpp.
508 .SS "std::vector<int> \fBfd_reap\fP"
509 .PP
510 Definition at line 91 of file modules.cpp.
511 .SS "\fBaddress_cache\fP \fBIP\fP"
512 .PP
513 Definition at line 176 of file modules.cpp.
514 .SS "char \fBlist\fP[MAXBUF]"
515 .PP
516 Definition at line 78 of file modules.cpp.
517 .SS "FILE* \fBlog_file\fP"
518 .PP
519 Definition at line 105 of file modules.cpp.
520 .SS "int \fBLogLevel\fP"
521 .PP
522 Definition at line 67 of file modules.cpp.
523 .SS "int \fBMaxWhoResults\fP"
524 .PP
525 Definition at line 88 of file modules.cpp.
526 .SS "\fBserverrec\fP* \fBme\fP[32]"
527 .PP
528 Definition at line 103 of file modules.cpp.
529 .SS "int \fBMODCOUNT\fP = -1"
530 .PP
531 Definition at line 763 of file modules.cpp.
532 .SS "std::vector<std::string> \fBmodule_names\fP"
533 .PP
534 Definition at line 92 of file modules.cpp.
535 .SS "vector<\fBModule\fP*> modules"
536 .PP
537 Definition at line 64 of file modules.cpp.
538 .SS "\fBfile_cache\fP \fBMOTD\fP"
539 .PP
540 Definition at line 174 of file modules.cpp.
541 .SS "char \fBmotd\fP[MAXBUF]"
542 .PP
543 Definition at line 76 of file modules.cpp.
544 .SS "time_t \fBnb_start\fP"
545 .PP
546 Definition at line 89 of file modules.cpp.
547 .SS "int \fBNetBufferSize\fP"
548 .PP
549 Definition at line 87 of file modules.cpp.
550 .SS "char \fBNetwork\fP[MAXBUF]"
551 .PP
552 Definition at line 69 of file modules.cpp.
553 .SS "int \fBportCount\fP"
554 .PP
555 Definition at line 95 of file modules.cpp.
556 .SS "int \fBports\fP[MAXSOCKS]"
557 .PP
558 Definition at line 97 of file modules.cpp.
559 .SS "char \fBPrefixQuit\fP[MAXBUF]"
560 .PP
561 Definition at line 79 of file modules.cpp.
562 .SS "char \fBrestartpass\fP[MAXBUF]"
563 .PP
564 Definition at line 75 of file modules.cpp.
565 .SS "\fBfile_cache\fP \fBRULES\fP"
566 .PP
567 Definition at line 175 of file modules.cpp.
568 .SS "char \fBrules\fP[MAXBUF]"
569 .PP
570 Definition at line 77 of file modules.cpp.
571 .SS "char \fBServerDesc\fP[MAXBUF]"
572 .PP
573 Definition at line 70 of file modules.cpp.
574 .SS "char \fBServerName\fP[MAXBUF]"
575 .PP
576 Definition at line 68 of file modules.cpp.
577 .SS "time_t \fBstartup_time\fP"
578 .PP
579 Definition at line 86 of file modules.cpp.
580 .SS "int \fBUDPportCount\fP"
581 .PP
582 Definition at line 96 of file modules.cpp.
583 .SS "\fBuser_hash\fP \fBwhowas\fP"
584 .PP
585 Definition at line 172 of file modules.cpp.
586 .SS "int \fBWHOWAS_MAX\fP"
587 .PP
588 Definition at line 84 of file modules.cpp.
589 .SS "int \fBWHOWAS_STALE\fP"
590 .PP
591 Definition at line 83 of file modules.cpp.
592 .SH "Author"
593 .PP 
594 Generated automatically by Doxygen for InspIRCd from the source code.