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