summaryrefslogtreecommitdiff
path: root/docs/module-doc/modules_8cpp-source.html
blob: fcf95d119e172be82bb6760dd2312fa3d3edf184 (plain)
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
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>InspIRCd: modules.cpp Source File</title>
<link href="inspircd.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.3 -->
<div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Compound&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Compound&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>modules.cpp</h1><a href="modules_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*       +------------------------------------+</span>
00002 <span class="comment"> *       | Inspire Internet Relay Chat Daemon |</span>
00003 <span class="comment"> *       +------------------------------------+</span>
00004 <span class="comment"> *</span>
00005 <span class="comment"> *  Inspire is copyright (C) 2002-2004 ChatSpike-Dev.</span>
00006 <span class="comment"> *                       E-mail:</span>
00007 <span class="comment"> *                &lt;brain@chatspike.net&gt;</span>
00008 <span class="comment"> *                &lt;Craig@chatspike.net&gt;</span>
00009 <span class="comment"> *     </span>
00010 <span class="comment"> * Written by Craig Edwards, Craig McLure, and others.</span>
00011 <span class="comment"> * This program is free but copyrighted software; see</span>
00012 <span class="comment"> *            the file COPYING for details.</span>
00013 <span class="comment"> *</span>
00014 <span class="comment"> * ---------------------------------------------------</span>
00015 <span class="comment"> */</span>
00016 
00017 <span class="preprocessor">#include "inspircd.h"</span>
00018 <span class="preprocessor">#include "inspircd_io.h"</span>
00019 <span class="preprocessor">#include "inspircd_util.h"</span>
00020 <span class="preprocessor">#include "inspircd_config.h"</span>
00021 <span class="preprocessor">#include &lt;unistd.h&gt;</span>
00022 <span class="preprocessor">#include &lt;fcntl.h&gt;</span>
00023 <span class="preprocessor">#include &lt;sys/errno.h&gt;</span>
00024 <span class="preprocessor">#include &lt;sys/ioctl.h&gt;</span>
00025 <span class="preprocessor">#include &lt;sys/utsname.h&gt;</span>
00026 <span class="preprocessor">#include &lt;cstdio&gt;</span>
00027 <span class="preprocessor">#include &lt;time.h&gt;</span>
00028 <span class="preprocessor">#include &lt;string&gt;</span>
00029 <span class="preprocessor">#ifdef GCC3</span>
00030 <span class="preprocessor"></span><span class="preprocessor">#include &lt;ext/hash_map&gt;</span>
00031 <span class="preprocessor">#else</span>
00032 <span class="preprocessor"></span><span class="preprocessor">#include &lt;hash_map&gt;</span>
00033 <span class="preprocessor">#endif</span>
00034 <span class="preprocessor"></span><span class="preprocessor">#include &lt;map&gt;</span>
00035 <span class="preprocessor">#include &lt;sstream&gt;</span>
00036 <span class="preprocessor">#include &lt;vector&gt;</span>
00037 <span class="preprocessor">#include &lt;errno.h&gt;</span>
00038 <span class="preprocessor">#include &lt;deque&gt;</span>
00039 <span class="preprocessor">#include &lt;errno.h&gt;</span>
00040 <span class="preprocessor">#include &lt;unistd.h&gt;</span>
00041 <span class="preprocessor">#include &lt;sched.h&gt;</span>
00042 <span class="preprocessor">#include "<a class="code" href="connection_8h.html">connection.h</a>"</span>
00043 <span class="preprocessor">#include "<a class="code" href="users_8h.html">users.h</a>"</span>
00044 <span class="preprocessor">#include "<a class="code" href="servers_8h.html">servers.h</a>"</span>
00045 <span class="preprocessor">#include "<a class="code" href="ctables_8h.html">ctables.h</a>"</span>
00046 <span class="preprocessor">#include "globals.h"</span>
00047 <span class="preprocessor">#include "<a class="code" href="modules_8h.html">modules.h</a>"</span>
00048 <span class="preprocessor">#include "dynamic.h"</span>
00049 <span class="preprocessor">#include "wildcard.h"</span>
00050 <span class="preprocessor">#include "<a class="code" href="message_8h.html">message.h</a>"</span>
00051 <span class="preprocessor">#include "<a class="code" href="mode_8h.html">mode.h</a>"</span>
00052 <span class="preprocessor">#include "<a class="code" href="xline_8h.html">xline.h</a>"</span>
00053 <span class="preprocessor">#include "<a class="code" href="commands_8h.html">commands.h</a>"</span>
00054 
00055 <span class="preprocessor">#ifdef GCC3</span>
00056 <span class="preprocessor"></span><span class="preprocessor">#define nspace __gnu_cxx</span>
00057 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00058"></a><a class="code" href="modules_8cpp.html#a0">00058</a> <span class="preprocessor"></span><span class="preprocessor">#define nspace std</span>
00059 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
00060 <span class="preprocessor"></span>
00061 <span class="keyword">using</span> <span class="keyword">namespace </span>std;
00062 
00063 <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="modules_8cpp.html#a1">MODCOUNT</a>;
<a name="l00064"></a><a class="code" href="modules_8cpp.html#a2">00064</a> <span class="keyword">extern</span> vector&lt;Module*&gt; <a class="code" href="channels_8cpp.html#a2">modules</a>;
<a name="l00065"></a><a class="code" href="modules_8cpp.html#a3">00065</a> <span class="keyword">extern</span> vector&lt;ircd_module*&gt; <a class="code" href="channels_8cpp.html#a3">factory</a>;
00066 
<a name="l00067"></a><a class="code" href="modules_8cpp.html#a4">00067</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a4">LogLevel</a>;
<a name="l00068"></a><a class="code" href="modules_8cpp.html#a5">00068</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a5">ServerName</a>[MAXBUF];
<a name="l00069"></a><a class="code" href="modules_8cpp.html#a6">00069</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a6">Network</a>[MAXBUF];
<a name="l00070"></a><a class="code" href="modules_8cpp.html#a7">00070</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a7">ServerDesc</a>[MAXBUF];
<a name="l00071"></a><a class="code" href="modules_8cpp.html#a8">00071</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a8">AdminName</a>[MAXBUF];
<a name="l00072"></a><a class="code" href="modules_8cpp.html#a9">00072</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a9">AdminEmail</a>[MAXBUF];
<a name="l00073"></a><a class="code" href="modules_8cpp.html#a10">00073</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a10">AdminNick</a>[MAXBUF];
<a name="l00074"></a><a class="code" href="modules_8cpp.html#a11">00074</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a11">diepass</a>[MAXBUF];
<a name="l00075"></a><a class="code" href="modules_8cpp.html#a12">00075</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a12">restartpass</a>[MAXBUF];
<a name="l00076"></a><a class="code" href="modules_8cpp.html#a13">00076</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a13">motd</a>[MAXBUF];
<a name="l00077"></a><a class="code" href="modules_8cpp.html#a14">00077</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a14">rules</a>[MAXBUF];
<a name="l00078"></a><a class="code" href="modules_8cpp.html#a15">00078</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a15">list</a>[MAXBUF];
<a name="l00079"></a><a class="code" href="modules_8cpp.html#a16">00079</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a16">PrefixQuit</a>[MAXBUF];
<a name="l00080"></a><a class="code" href="modules_8cpp.html#a17">00080</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a17">DieValue</a>[MAXBUF];
00081 
<a name="l00082"></a><a class="code" href="modules_8cpp.html#a18">00082</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a18">debugging</a>;
<a name="l00083"></a><a class="code" href="modules_8cpp.html#a19">00083</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a19">WHOWAS_STALE</a>;
<a name="l00084"></a><a class="code" href="modules_8cpp.html#a20">00084</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a20">WHOWAS_MAX</a>;
<a name="l00085"></a><a class="code" href="modules_8cpp.html#a21">00085</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a21">DieDelay</a>;
<a name="l00086"></a><a class="code" href="modules_8cpp.html#a22">00086</a> <span class="keyword">extern</span> time_t <a class="code" href="channels_8cpp.html#a22">startup_time</a>;
<a name="l00087"></a><a class="code" href="modules_8cpp.html#a23">00087</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a23">NetBufferSize</a>;
<a name="l00088"></a><a class="code" href="modules_8cpp.html#a24">00088</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a24">MaxWhoResults</a>;
<a name="l00089"></a><a class="code" href="modules_8cpp.html#a25">00089</a> <span class="keyword">extern</span> time_t <a class="code" href="channels_8cpp.html#a25">nb_start</a>;
00090 
<a name="l00091"></a><a class="code" href="modules_8cpp.html#a26">00091</a> <span class="keyword">extern</span> std::vector&lt;int&gt; <a class="code" href="channels_8cpp.html#a26">fd_reap</a>;
<a name="l00092"></a><a class="code" href="modules_8cpp.html#a27">00092</a> <span class="keyword">extern</span> std::vector&lt;std::string&gt; <a class="code" href="channels_8cpp.html#a27">module_names</a>;
00093 
<a name="l00094"></a><a class="code" href="modules_8cpp.html#a28">00094</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a28">boundPortCount</a>;
<a name="l00095"></a><a class="code" href="modules_8cpp.html#a29">00095</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a29">portCount</a>;
<a name="l00096"></a><a class="code" href="modules_8cpp.html#a30">00096</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a30">UDPportCount</a>;
<a name="l00097"></a><a class="code" href="modules_8cpp.html#a31">00097</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a31">ports</a>[MAXSOCKS];
<a name="l00098"></a><a class="code" href="modules_8cpp.html#a32">00098</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a32">defaultRoute</a>;
00099 
<a name="l00100"></a><a class="code" href="modules_8cpp.html#a33">00100</a> <span class="keyword">extern</span> std::vector&lt;long&gt; <a class="code" href="channels_8cpp.html#a33">auth_cookies</a>;
<a name="l00101"></a><a class="code" href="modules_8cpp.html#a34">00101</a> <span class="keyword">extern</span> std::stringstream <a class="code" href="channels_8cpp.html#a34">config_f</a>;
00102 
<a name="l00103"></a><a class="code" href="modules_8cpp.html#a35">00103</a> <span class="keyword">extern</span> <a class="code" href="classserverrec.html">serverrec</a>* <a class="code" href="channels_8cpp.html#a35">me</a>[32];
00104 
<a name="l00105"></a><a class="code" href="modules_8cpp.html#a36">00105</a> <span class="keyword">extern</span> FILE *<a class="code" href="channels_8cpp.html#a36">log_file</a>;
00106 
00107 
<a name="l00108"></a><a class="code" href="namespacenspace.html">00108</a> <span class="keyword">namespace </span><a class="code" href="channels_8cpp.html#a0">nspace</a>
00109 {
<a name="l00110"></a><a class="code" href="structnspace_1_1nspace_1_1hash_3_01in__addr_01_4.html">00110</a>         <span class="keyword">template</span>&lt;&gt; <span class="keyword">struct </span>nspace::hash&lt;in_addr&gt;
00111         {
<a name="l00112"></a><a class="code" href="structnspace_1_1nspace_1_1hash_3_01in__addr_01_4.html#a0">00112</a>                 size_t operator()(<span class="keyword">const</span> <span class="keyword">struct</span> in_addr &amp;a)<span class="keyword"> const</span>
00113 <span class="keyword">                </span>{
00114                         size_t q;
00115                         memcpy(&amp;q,&amp;a,<span class="keyword">sizeof</span>(size_t));
00116                         <span class="keywordflow">return</span> q;
00117                 }
00118         };
00119 
<a name="l00120"></a><a class="code" href="structnspace_1_1nspace_1_1hash_3_01string_01_4.html">00120</a>         <span class="keyword">template</span>&lt;&gt; <span class="keyword">struct </span>nspace::hash&lt;string&gt;
00121         {
<a name="l00122"></a><a class="code" href="structnspace_1_1nspace_1_1hash_3_01string_01_4.html#a0">00122</a>                 size_t operator()(<span class="keyword">const</span> string &amp;s)<span class="keyword"> const</span>
00123 <span class="keyword">                </span>{
00124                         <span class="keywordtype">char</span> a[MAXBUF];
00125                         <span class="keyword">static</span> <span class="keyword">struct </span>hash&lt;const char *&gt; strhash;
00126                         strlcpy(a,s.c_str(),MAXBUF);
00127                         strlower(a);
00128                         <span class="keywordflow">return</span> strhash(a);
00129                 }
00130         };
00131 }       
00132 
00133 
<a name="l00134"></a><a class="code" href="structStrHashComp.html">00134</a> <span class="keyword">struct </span><a class="code" href="structStrHashComp.html">StrHashComp</a>
00135 {
00136 
<a name="l00137"></a><a class="code" href="structStrHashComp.html#a0">00137</a>         <span class="keywordtype">bool</span> operator()(<span class="keyword">const</span> string&amp; s1, <span class="keyword">const</span> string&amp; s2)<span class="keyword"> const</span>
00138 <span class="keyword">        </span>{
00139                 <span class="keywordtype">char</span> a[MAXBUF],b[MAXBUF];
00140                 strlcpy(a,s1.c_str(),MAXBUF);
00141                 strlcpy(b,s2.c_str(),MAXBUF);
00142                 <span class="keywordflow">return</span> (strcasecmp(a,b) == 0);
00143         }
00144 
00145 };
00146 
<a name="l00147"></a><a class="code" href="structInAddr__HashComp.html">00147</a> <span class="keyword">struct </span><a class="code" href="structInAddr__HashComp.html">InAddr_HashComp</a>
00148 {
00149 
<a name="l00150"></a><a class="code" href="structInAddr__HashComp.html#a0">00150</a>         <span class="keywordtype">bool</span> operator()(<span class="keyword">const</span> in_addr &amp;s1, <span class="keyword">const</span> in_addr &amp;s2)<span class="keyword"> const</span>
00151 <span class="keyword">        </span>{
00152                 size_t q;
00153                 size_t p;
00154                 
00155                 memcpy(&amp;q,&amp;s1,<span class="keyword">sizeof</span>(size_t));
00156                 memcpy(&amp;p,&amp;s2,<span class="keyword">sizeof</span>(size_t));
00157                 
00158                 <span class="keywordflow">return</span> (q == p);
00159         }
00160 
00161 };
00162 
00163 
<a name="l00164"></a><a class="code" href="modules_8cpp.html#a37">00164</a> <span class="keyword">typedef</span> nspace::hash_map&lt;std::string, userrec*, nspace::hash&lt;string&gt;, <a class="code" href="structStrHashComp.html">StrHashComp</a>&gt; <a class="code" href="modules_8cpp.html#a37">user_hash</a>;
<a name="l00165"></a><a class="code" href="modules_8cpp.html#a38">00165</a> <span class="keyword">typedef</span> nspace::hash_map&lt;std::string, chanrec*, nspace::hash&lt;string&gt;, <a class="code" href="structStrHashComp.html">StrHashComp</a>&gt; <a class="code" href="modules_8cpp.html#a38">chan_hash</a>;
<a name="l00166"></a><a class="code" href="modules_8cpp.html#a39">00166</a> <span class="keyword">typedef</span> nspace::hash_map&lt;in_addr,string*, nspace::hash&lt;in_addr&gt;, <a class="code" href="structInAddr__HashComp.html">InAddr_HashComp</a>&gt; <a class="code" href="modules_8cpp.html#a39">address_cache</a>;
<a name="l00167"></a><a class="code" href="modules_8cpp.html#a40">00167</a> <span class="keyword">typedef</span> std::deque&lt;command_t&gt; <a class="code" href="modules_8cpp.html#a40">command_table</a>;
00168 
00169 
<a name="l00170"></a><a class="code" href="modules_8cpp.html#a41">00170</a> <span class="keyword">extern</span> <a class="code" href="modules_8cpp.html#a37">user_hash</a> <a class="code" href="modules_8cpp.html#a41">clientlist</a>;
<a name="l00171"></a><a class="code" href="modules_8cpp.html#a42">00171</a> <span class="keyword">extern</span> <a class="code" href="modules_8cpp.html#a38">chan_hash</a> <a class="code" href="modules_8cpp.html#a42">chanlist</a>;
<a name="l00172"></a><a class="code" href="modules_8cpp.html#a43">00172</a> <span class="keyword">extern</span> <a class="code" href="modules_8cpp.html#a37">user_hash</a> <a class="code" href="modules_8cpp.html#a43">whowas</a>;
<a name="l00173"></a><a class="code" href="modules_8cpp.html#a44">00173</a> <span class="keyword">extern</span> <a class="code" href="modules_8cpp.html#a40">command_table</a> <a class="code" href="modules_8cpp.html#a44">cmdlist</a>;
<a name="l00174"></a><a class="code" href="modules_8cpp.html#a45">00174</a> <span class="keyword">extern</span> <a class="code" href="modules_8h.html#a26">file_cache</a> <a class="code" href="modules_8cpp.html#a45">MOTD</a>;
<a name="l00175"></a><a class="code" href="modules_8cpp.html#a46">00175</a> <span class="keyword">extern</span> <a class="code" href="modules_8h.html#a26">file_cache</a> <a class="code" href="modules_8cpp.html#a46">RULES</a>;
<a name="l00176"></a><a class="code" href="modules_8cpp.html#a47">00176</a> <span class="keyword">extern</span> <a class="code" href="modules_8cpp.html#a39">address_cache</a> <a class="code" href="modules_8cpp.html#a47">IP</a>;
00177 
00178 
00179 <span class="comment">// class type for holding an extended mode character - internal to core</span>
00180 
<a name="l00181"></a><a class="code" href="classExtMode.html">00181</a> <span class="keyword">class </span><a class="code" href="classExtMode.html">ExtMode</a> : <span class="keyword">public</span> <a class="code" href="classclassbase.html">classbase</a>
00182 {
00183 <span class="keyword">public</span>:
<a name="l00184"></a><a class="code" href="classExtMode.html#o0">00184</a>         <span class="keywordtype">char</span> modechar;
<a name="l00185"></a><a class="code" href="classExtMode.html#o1">00185</a>         <span class="keywordtype">int</span> type;
<a name="l00186"></a><a class="code" href="classExtMode.html#o2">00186</a>         <span class="keywordtype">int</span> params_when_on;
<a name="l00187"></a><a class="code" href="classExtMode.html#o3">00187</a>         <span class="keywordtype">int</span> params_when_off;
<a name="l00188"></a><a class="code" href="classExtMode.html#o4">00188</a>         <span class="keywordtype">bool</span> needsoper;
<a name="l00189"></a><a class="code" href="classExtMode.html#o5">00189</a>         <span class="keywordtype">bool</span> <a class="code" href="channels_8cpp.html#a15">list</a>;
<a name="l00190"></a><a class="code" href="classExtMode.html#a0">00190</a>         <a class="code" href="classExtMode.html">ExtMode</a>(<span class="keywordtype">char</span> mc, <span class="keywordtype">int</span> ty, <span class="keywordtype">bool</span> oper, <span class="keywordtype">int</span> p_on, <span class="keywordtype">int</span> p_off) : modechar(mc), type(ty), needsoper(oper), params_when_on(p_on), params_when_off(p_off) { };
00191 };                                     
00192 
<a name="l00193"></a><a class="code" href="modules_8cpp.html#a48">00193</a> <span class="keyword">typedef</span> std::vector&lt;ExtMode&gt; <a class="code" href="modules_8cpp.html#a48">ExtModeList</a>;
<a name="l00194"></a><a class="code" href="modules_8cpp.html#a49">00194</a> <span class="keyword">typedef</span> ExtModeList::iterator <a class="code" href="modules_8cpp.html#a49">ExtModeListIter</a>;
00195 
00196 
<a name="l00197"></a><a class="code" href="modules_8cpp.html#a50">00197</a> <a class="code" href="modules_8cpp.html#a48">ExtModeList</a> <a class="code" href="modules_8cpp.html#a50">EMode</a>;
00198 
00199 <span class="comment">// returns true if an extended mode character is in use</span>
<a name="l00200"></a><a class="code" href="modules_8cpp.html#a51">00200</a> <span class="keywordtype">bool</span> <a class="code" href="modules_8cpp.html#a51">ModeDefined</a>(<span class="keywordtype">char</span> modechar, <span class="keywordtype">int</span> type)
00201 {
00202         log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"Size of extmodes vector is %d"</span>,<a class="code" href="modules_8cpp.html#a50">EMode</a>.size());
00203         <span class="keywordflow">for</span> (<a class="code" href="modules_8cpp.html#a49">ExtModeListIter</a> i = <a class="code" href="modules_8cpp.html#a50">EMode</a>.begin(); i &lt; <a class="code" href="modules_8cpp.html#a50">EMode</a>.end(); i++)
00204         {
00205                 <span class="keywordflow">if</span> ((i-&gt;modechar == modechar) &amp;&amp; (i-&gt;type == type))
00206                 {
00207                         <span class="keywordflow">return</span> <span class="keyword">true</span>;
00208                 }
00209         }
00210         <span class="keywordflow">return</span> <span class="keyword">false</span>;
00211 }
00212 
<a name="l00213"></a><a class="code" href="modules_8cpp.html#a52">00213</a> <span class="keywordtype">bool</span> <a class="code" href="modules_8cpp.html#a52">ModeIsListMode</a>(<span class="keywordtype">char</span> modechar, <span class="keywordtype">int</span> type)
00214 {
00215         log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"Size of extmodes vector is %d"</span>,<a class="code" href="modules_8cpp.html#a50">EMode</a>.size());
00216         <span class="keywordflow">for</span> (<a class="code" href="modules_8cpp.html#a49">ExtModeListIter</a> i = <a class="code" href="modules_8cpp.html#a50">EMode</a>.begin(); i &lt; <a class="code" href="modules_8cpp.html#a50">EMode</a>.end(); i++)
00217         {
00218                 <span class="keywordflow">if</span> ((i-&gt;modechar == modechar) &amp;&amp; (i-&gt;type == type) &amp;&amp; (i-&gt;list == <span class="keyword">true</span>))
00219                 {
00220                         <span class="keywordflow">return</span> <span class="keyword">true</span>;
00221                 }
00222         }
00223         <span class="keywordflow">return</span> <span class="keyword">false</span>;
00224 }
00225 
<a name="l00226"></a><a class="code" href="modules_8cpp.html#a53">00226</a> <span class="keywordtype">bool</span> <a class="code" href="modules_8cpp.html#a53">ModeDefinedOper</a>(<span class="keywordtype">char</span> modechar, <span class="keywordtype">int</span> type)
00227 {
00228         log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"Size of extmodes vector is %d"</span>,<a class="code" href="modules_8cpp.html#a50">EMode</a>.size());
00229         <span class="keywordflow">for</span> (<a class="code" href="modules_8cpp.html#a49">ExtModeListIter</a> i = <a class="code" href="modules_8cpp.html#a50">EMode</a>.begin(); i &lt; <a class="code" href="modules_8cpp.html#a50">EMode</a>.end(); i++)
00230         {
00231                 <span class="keywordflow">if</span> ((i-&gt;modechar == modechar) &amp;&amp; (i-&gt;type == type) &amp;&amp; (i-&gt;needsoper == <span class="keyword">true</span>))
00232                 {
00233                         <span class="keywordflow">return</span> <span class="keyword">true</span>;
00234                 }
00235         }
00236         <span class="keywordflow">return</span> <span class="keyword">false</span>;
00237 }
00238 
00239 <span class="comment">// returns number of parameters for a custom mode when it is switched on</span>
<a name="l00240"></a><a class="code" href="modules_8cpp.html#a54">00240</a> <span class="keywordtype">int</span> <a class="code" href="modules_8cpp.html#a54">ModeDefinedOn</a>(<span class="keywordtype">char</span> modechar, <span class="keywordtype">int</span> type)
00241 {
00242         <span class="keywordflow">for</span> (<a class="code" href="modules_8cpp.html#a49">ExtModeListIter</a> i = <a class="code" href="modules_8cpp.html#a50">EMode</a>.begin(); i &lt; <a class="code" href="modules_8cpp.html#a50">EMode</a>.end(); i++)
00243         {
00244                 <span class="keywordflow">if</span> ((i-&gt;modechar == modechar) &amp;&amp; (i-&gt;type == type))
00245                 {
00246                         <span class="keywordflow">return</span> i-&gt;params_when_on;
00247                 }
00248         }
00249         <span class="keywordflow">return</span> 0;
00250 }
00251 
00252 <span class="comment">// returns number of parameters for a custom mode when it is switched on</span>
<a name="l00253"></a><a class="code" href="modules_8cpp.html#a55">00253</a> <span class="keywordtype">int</span> <a class="code" href="modules_8cpp.html#a55">ModeDefinedOff</a>(<span class="keywordtype">char</span> modechar, <span class="keywordtype">int</span> type)
00254 {
00255         <span class="keywordflow">for</span> (<a class="code" href="modules_8cpp.html#a49">ExtModeListIter</a> i = <a class="code" href="modules_8cpp.html#a50">EMode</a>.begin(); i &lt; <a class="code" href="modules_8cpp.html#a50">EMode</a>.end(); i++)
00256         {
00257                 <span class="keywordflow">if</span> ((i-&gt;modechar == modechar) &amp;&amp; (i-&gt;type == type))
00258                 {
00259                         <span class="keywordflow">return</span> i-&gt;params_when_off;
00260                 }
00261         }
00262         <span class="keywordflow">return</span> 0;
00263 }
00264 
00265 <span class="comment">// returns true if an extended mode character is in use</span>
<a name="l00266"></a><a class="code" href="modules_8cpp.html#a56">00266</a> <span class="keywordtype">bool</span> <a class="code" href="modules_8cpp.html#a56">DoAddExtendedMode</a>(<span class="keywordtype">char</span> modechar, <span class="keywordtype">int</span> type, <span class="keywordtype">bool</span> requires_oper, <span class="keywordtype">int</span> params_on, <span class="keywordtype">int</span> params_off)
00267 {
00268         <span class="keywordflow">if</span> (<a class="code" href="modules_8cpp.html#a51">ModeDefined</a>(modechar,type)) {
00269                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
00270         }
00271         <a class="code" href="modules_8cpp.html#a50">EMode</a>.push_back(<a class="code" href="classExtMode.html">ExtMode</a>(modechar,type,requires_oper,params_on,params_off));
00272         <span class="keywordflow">return</span> <span class="keyword">true</span>;
00273 }
00274 
00275 <span class="comment">// turns a mode into a listmode</span>
<a name="l00276"></a><a class="code" href="modules_8cpp.html#a57">00276</a> <span class="keywordtype">void</span> <a class="code" href="modules_8cpp.html#a57">ModeMakeList</a>(<span class="keywordtype">char</span> modechar)
00277 {
00278         <span class="keywordflow">for</span> (<a class="code" href="modules_8cpp.html#a49">ExtModeListIter</a> i = <a class="code" href="modules_8cpp.html#a50">EMode</a>.begin(); i &lt; <a class="code" href="modules_8cpp.html#a50">EMode</a>.end(); i++)
00279         {
00280                 <span class="keywordflow">if</span> ((i-&gt;modechar == modechar) &amp;&amp; (i-&gt;type == <a class="code" href="modules_8h.html#a5">MT_CHANNEL</a>))
00281                 {
00282                         i-&gt;list = <span class="keyword">true</span>;
00283                         <span class="keywordflow">return</span>;
00284                 }
00285         }
00286         <span class="keywordflow">return</span>;
00287 }
00288 
00289 <span class="comment">// version is a simple class for holding a modules version number</span>
00290 
<a name="l00291"></a><a class="code" href="classVersion.html#a0">00291</a> <a class="code" href="classVersion.html#a0">Version::Version</a>(<span class="keywordtype">int</span> major, <span class="keywordtype">int</span> minor, <span class="keywordtype">int</span> revision, <span class="keywordtype">int</span> build) : Major(major), Minor(minor), Revision(revision), Build(build) { };
00292 
00293 <span class="comment">// admin is a simple class for holding a server's administrative info</span>
00294 
<a name="l00295"></a><a class="code" href="classAdmin.html#a0">00295</a> <a class="code" href="classAdmin.html#a0">Admin::Admin</a>(std::string name, std::string email, std::string nick) : Name(name), Email(email), Nick(nick) { };
00296 
<a name="l00297"></a><a class="code" href="classModule.html#a0">00297</a> <a class="code" href="classModule.html#a0">Module::Module</a>() { }
<a name="l00298"></a><a class="code" href="classModule.html#a1">00298</a> <a class="code" href="classModule.html#a1">Module::~Module</a>() { }
<a name="l00299"></a><a class="code" href="classModule.html#a3">00299</a> <span class="keywordtype">void</span> <a class="code" href="classModule.html#a3">Module::OnUserConnect</a>(<a class="code" href="classuserrec.html">userrec</a>* user) { }
<a name="l00300"></a><a class="code" href="classModule.html#a4">00300</a> <span class="keywordtype">void</span> <a class="code" href="classModule.html#a4">Module::OnUserQuit</a>(<a class="code" href="classuserrec.html">userrec</a>* user) { }
<a name="l00301"></a><a class="code" href="classModule.html#a5">00301</a> <span class="keywordtype">void</span> <a class="code" href="classModule.html#a5">Module::OnUserJoin</a>(<a class="code" href="classuserrec.html">userrec</a>* user, <a class="code" href="classchanrec.html">chanrec</a>* channel) { }
<a name="l00302"></a><a class="code" href="classModule.html#a6">00302</a> <span class="keywordtype">void</span> <a class="code" href="classModule.html#a6">Module::OnUserPart</a>(<a class="code" href="classuserrec.html">userrec</a>* user, <a class="code" href="classchanrec.html">chanrec</a>* channel) { }
<a name="l00303"></a><a class="code" href="classModule.html#a7">00303</a> <span class="keywordtype">void</span> <a class="code" href="classModule.html#a7">Module::OnPacketTransmit</a>(<span class="keywordtype">char</span> *p) { }
<a name="l00304"></a><a class="code" href="classModule.html#a8">00304</a> <span class="keywordtype">void</span> <a class="code" href="classModule.html#a8">Module::OnPacketReceive</a>(<span class="keywordtype">char</span> *p) { }
<a name="l00305"></a><a class="code" href="classModule.html#a9">00305</a> <span class="keywordtype">void</span> <a class="code" href="classModule.html#a9">Module::OnRehash</a>() { }
<a name="l00306"></a><a class="code" href="classModule.html#a10">00306</a> <span class="keywordtype">void</span> <a class="code" href="classModule.html#a10">Module::OnServerRaw</a>(std::string &amp;raw, <span class="keywordtype">bool</span> inbound, <a class="code" href="classuserrec.html">userrec</a>* user) { }
<a name="l00307"></a><a class="code" href="classModule.html#a12">00307</a> <span class="keywordtype">int</span> <a class="code" href="classModule.html#a12">Module::OnUserPreJoin</a>(<a class="code" href="classuserrec.html">userrec</a>* user, <a class="code" href="classchanrec.html">chanrec</a>* chan, <span class="keyword">const</span> <span class="keywordtype">char</span>* cname) { <span class="keywordflow">return</span> 0; }
<a name="l00308"></a><a class="code" href="classModule.html#a11">00308</a> <span class="keywordtype">int</span> <a class="code" href="classModule.html#a11">Module::OnExtendedMode</a>(<a class="code" href="classuserrec.html">userrec</a>* user, <span class="keywordtype">void</span>* target, <span class="keywordtype">char</span> modechar, <span class="keywordtype">int</span> type, <span class="keywordtype">bool</span> mode_on, string_list &amp;params) { <span class="keywordflow">return</span> <span class="keyword">false</span>; }
<a name="l00309"></a><a class="code" href="classModule.html#a2">00309</a> <a class="code" href="classVersion.html">Version</a> <a class="code" href="classModule.html#a2">Module::GetVersion</a>() { <span class="keywordflow">return</span> <a class="code" href="classVersion.html">Version</a>(1,0,0,0); }
<a name="l00310"></a><a class="code" href="classModule.html#a13">00310</a> <span class="keywordtype">void</span> <a class="code" href="classModule.html#a13">Module::OnOper</a>(<a class="code" href="classuserrec.html">userrec</a>* user) { };
<a name="l00311"></a><a class="code" href="classModule.html#a14">00311</a> <span class="keywordtype">void</span> <a class="code" href="classModule.html#a14">Module::OnInfo</a>(<a class="code" href="classuserrec.html">userrec</a>* user) { };
<a name="l00312"></a><a class="code" href="classModule.html#a15">00312</a> <span class="keywordtype">void</span> <a class="code" href="classModule.html#a15">Module::OnWhois</a>(<a class="code" href="classuserrec.html">userrec</a>* source, <a class="code" href="classuserrec.html">userrec</a>* dest) { };
<a name="l00313"></a><a class="code" href="classModule.html#a16">00313</a> <span class="keywordtype">int</span> <a class="code" href="classModule.html#a16">Module::OnUserPreInvite</a>(<a class="code" href="classuserrec.html">userrec</a>* source,<a class="code" href="classuserrec.html">userrec</a>* dest,<a class="code" href="classchanrec.html">chanrec</a>* channel) { <span class="keywordflow">return</span> 0; };
<a name="l00314"></a><a class="code" href="classModule.html#a17">00314</a> <span class="keywordtype">int</span> <a class="code" href="classModule.html#a17">Module::OnUserPreMessage</a>(<a class="code" href="classuserrec.html">userrec</a>* user,<span class="keywordtype">void</span>* dest,<span class="keywordtype">int</span> target_type, std::string &amp;text) { <span class="keywordflow">return</span> 0; };
<a name="l00315"></a><a class="code" href="classModule.html#a18">00315</a> <span class="keywordtype">int</span> <a class="code" href="classModule.html#a18">Module::OnUserPreNotice</a>(<a class="code" href="classuserrec.html">userrec</a>* user,<span class="keywordtype">void</span>* dest,<span class="keywordtype">int</span> target_type, std::string &amp;text) { <span class="keywordflow">return</span> 0; };
<a name="l00316"></a><a class="code" href="classModule.html#a19">00316</a> <span class="keywordtype">int</span> <a class="code" href="classModule.html#a19">Module::OnUserPreNick</a>(<a class="code" href="classuserrec.html">userrec</a>* user, std::string newnick) { <span class="keywordflow">return</span> 0; };
<a name="l00317"></a><a class="code" href="classModule.html#a20">00317</a> <span class="keywordtype">int</span> <a class="code" href="classModule.html#a20">Module::OnAccessCheck</a>(<a class="code" href="classuserrec.html">userrec</a>* source,<a class="code" href="classuserrec.html">userrec</a>* dest,<a class="code" href="classchanrec.html">chanrec</a>* channel,<span class="keywordtype">int</span> access_type) { <span class="keywordflow">return</span> <a class="code" href="modules_8h.html#a8">ACR_DEFAULT</a>; };
<a name="l00318"></a><a class="code" href="classModule.html#a21">00318</a> <a class="code" href="modules_8h.html#a27">string_list</a> <a class="code" href="classModule.html#a21">Module::OnUserSync</a>(<a class="code" href="classuserrec.html">userrec</a>* user) { <a class="code" href="modules_8h.html#a27">string_list</a> empty; <span class="keywordflow">return</span> empty; }
<a name="l00319"></a><a class="code" href="classModule.html#a22">00319</a> <a class="code" href="modules_8h.html#a27">string_list</a> <a class="code" href="classModule.html#a22">Module::OnChannelSync</a>(<a class="code" href="classchanrec.html">chanrec</a>* chan) { <a class="code" href="modules_8h.html#a27">string_list</a> empty; <span class="keywordflow">return</span> empty; }
00320 
00321 
00322 <span class="comment">// server is a wrapper class that provides methods to all of the C-style</span>
00323 <span class="comment">// exports in the core</span>
00324 <span class="comment">//</span>
00325 
<a name="l00326"></a><a class="code" href="classServer.html#a0">00326</a> <a class="code" href="classServer.html#a0">Server::Server</a>()
00327 {
00328 }
00329 
<a name="l00330"></a><a class="code" href="classServer.html#a1">00330</a> <a class="code" href="classServer.html#a1">Server::~Server</a>()
00331 {
00332 }
00333 
<a name="l00334"></a><a class="code" href="classServer.html#a2">00334</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a2">Server::SendOpers</a>(std::string s)
00335 {
00336         WriteOpers(<span class="stringliteral">"%s"</span>,s.c_str());
00337 }
00338 
<a name="l00339"></a><a class="code" href="classServer.html#a30">00339</a> <span class="keywordtype">bool</span> <a class="code" href="classServer.html#a30">Server::MatchText</a>(std::string sliteral, std::string spattern)
00340 {
00341         <span class="keywordtype">char</span> literal[MAXBUF],pattern[MAXBUF];
00342         strlcpy(literal,sliteral.c_str(),MAXBUF);
00343         strlcpy(pattern,spattern.c_str(),MAXBUF);
00344         <span class="keywordflow">return</span> match(literal,pattern);
00345 }
00346 
<a name="l00347"></a><a class="code" href="classServer.html#a25">00347</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a25">Server::SendToModeMask</a>(std::string modes, <span class="keywordtype">int</span> flags, std::string text)
00348 {
00349         WriteMode(modes.c_str(),flags,<span class="stringliteral">"%s"</span>,text.c_str());
00350 }
00351 
<a name="l00352"></a><a class="code" href="classServer.html#a26">00352</a> <a class="code" href="classchanrec.html">chanrec</a>* <a class="code" href="classServer.html#a26">Server::JoinUserToChannel</a>(<a class="code" href="classuserrec.html">userrec</a>* user, std::string cname, std::string key)
00353 {
00354         <span class="keywordflow">return</span> add_channel(user,cname.c_str(),key.c_str(),<span class="keyword">true</span>);
00355 }
00356 
<a name="l00357"></a><a class="code" href="classServer.html#a27">00357</a> <a class="code" href="classchanrec.html">chanrec</a>* <a class="code" href="classServer.html#a27">Server::PartUserFromChannel</a>(<a class="code" href="classuserrec.html">userrec</a>* user, std::string cname, std::string reason)
00358 {
00359         <span class="keywordflow">return</span> del_channel(user,cname.c_str(),reason.c_str(),<span class="keyword">false</span>);
00360 }
00361 
<a name="l00362"></a><a class="code" href="classServer.html#a35">00362</a> <a class="code" href="modules_8h.html#a28">chanuserlist</a> <a class="code" href="classServer.html#a35">Server::GetUsers</a>(<a class="code" href="classchanrec.html">chanrec</a>* chan)
00363 {
00364         <a class="code" href="modules_8h.html#a28">chanuserlist</a> userl;
00365         userl.clear();
00366         <span class="keywordflow">for</span> (user_hash::const_iterator i = <a class="code" href="modules_8cpp.html#a41">clientlist</a>.begin(); i != <a class="code" href="modules_8cpp.html#a41">clientlist</a>.end(); i++)
00367         {
00368                 <span class="keywordflow">if</span> (i-&gt;second)
00369                 {
00370                         <span class="keywordflow">if</span> (<a class="code" href="message_8h.html#a16">has_channel</a>(i-&gt;second,chan))
00371                         {
00372                                 <span class="keywordflow">if</span> (<a class="code" href="message_8h.html#a13">isnick</a>(i-&gt;second-&gt;nick))
00373                                 {
00374                                         userl.push_back(i-&gt;second);
00375                                 }
00376                         }
00377                 }
00378         }
00379         <span class="keywordflow">return</span> userl;
00380 }
<a name="l00381"></a><a class="code" href="classServer.html#a28">00381</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a28">Server::ChangeUserNick</a>(<a class="code" href="classuserrec.html">userrec</a>* user, std::string nickname)
00382 {
00383         force_nickchange(user,nickname.c_str());
00384 }
00385 
<a name="l00386"></a><a class="code" href="classServer.html#a29">00386</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a29">Server::QuitUser</a>(<a class="code" href="classuserrec.html">userrec</a>* user, std::string reason)
00387 {
00388         <a class="code" href="message_8h.html#a19">send_network_quit</a>(user-&gt;<a class="code" href="classuserrec.html#o0">nick</a>,reason.c_str());
00389         kill_link(user,reason.c_str());
00390 }
00391 
<a name="l00392"></a><a class="code" href="classServer.html#a34">00392</a> <span class="keywordtype">bool</span> <a class="code" href="classServer.html#a34">Server::IsUlined</a>(std::string server)
00393 {
00394         <span class="keywordflow">return</span> <a class="code" href="commands_8h.html#a71">is_uline</a>(server.c_str());
00395 }
00396 
<a name="l00397"></a><a class="code" href="classServer.html#a31">00397</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a31">Server::CallCommandHandler</a>(std::string commandname, <span class="keywordtype">char</span>** parameters, <span class="keywordtype">int</span> pcnt, <a class="code" href="classuserrec.html">userrec</a>* user)
00398 {
00399         call_handler(commandname.c_str(),parameters,pcnt,user);
00400 }
00401 
<a name="l00402"></a><a class="code" href="classServer.html#a3">00402</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a3">Server::Log</a>(<span class="keywordtype">int</span> level, std::string s)
00403 {
00404         log(level,<span class="stringliteral">"%s"</span>,s.c_str());
00405 }
00406 
<a name="l00407"></a><a class="code" href="classServer.html#a23">00407</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a23">Server::AddCommand</a>(<span class="keywordtype">char</span>* cmd, handlerfunc f, <span class="keywordtype">char</span> flags, <span class="keywordtype">int</span> minparams)
00408 {
00409         <a class="code" href="modules_8h.html#a30">createcommand</a>(cmd,f,flags,minparams);
00410 }
00411 
<a name="l00412"></a><a class="code" href="classServer.html#a24">00412</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a24">Server::SendMode</a>(<span class="keywordtype">char</span> **parameters, <span class="keywordtype">int</span> pcnt, <a class="code" href="classuserrec.html">userrec</a> *user)
00413 {
00414         <a class="code" href="modules_8h.html#a31">server_mode</a>(parameters,pcnt,user);
00415 }
00416 
<a name="l00417"></a><a class="code" href="classServer.html#a4">00417</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a4">Server::Send</a>(<span class="keywordtype">int</span> Socket, std::string s)
00418 {
00419         Write(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
00420 }
00421 
<a name="l00422"></a><a class="code" href="classServer.html#a5">00422</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a5">Server::SendServ</a>(<span class="keywordtype">int</span> Socket, std::string s)
00423 {
00424         WriteServ(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
00425 }
00426 
<a name="l00427"></a><a class="code" href="classServer.html#a6">00427</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a6">Server::SendFrom</a>(<span class="keywordtype">int</span> Socket, <a class="code" href="classuserrec.html">userrec</a>* User, std::string s)
00428 {
00429         WriteFrom(Socket,User,<span class="stringliteral">"%s"</span>,s.c_str());
00430 }
00431 
<a name="l00432"></a><a class="code" href="classServer.html#a7">00432</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a7">Server::SendTo</a>(<a class="code" href="classuserrec.html">userrec</a>* Source, <a class="code" href="classuserrec.html">userrec</a>* Dest, std::string s)
00433 {
00434         <span class="keywordflow">if</span> (!Source)
00435         {
00436                 <span class="comment">// if source is NULL, then the message originates from the local server</span>
00437                 Write(Dest-&gt;<a class="code" href="classconnection.html#o0">fd</a>,<span class="stringliteral">":%s %s"</span>,this-&gt;GetServerName().c_str(),s.c_str());
00438         }
00439         <span class="keywordflow">else</span>
00440         {
00441                 <span class="comment">// otherwise it comes from the user specified</span>
00442                 WriteTo(Source,Dest,<span class="stringliteral">"%s"</span>,s.c_str());
00443         }
00444 }
00445 
<a name="l00446"></a><a class="code" href="classServer.html#a8">00446</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a8">Server::SendChannel</a>(<a class="code" href="classuserrec.html">userrec</a>* User, <a class="code" href="classchanrec.html">chanrec</a>* Channel, std::string s,<span class="keywordtype">bool</span> IncludeSender)
00447 {
00448         <span class="keywordflow">if</span> (IncludeSender)
00449         {
00450                 WriteChannel(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str());
00451         }
00452         <span class="keywordflow">else</span>
00453         {
00454                 ChanExceptSender(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str());
00455         }
00456 }
00457 
<a name="l00458"></a><a class="code" href="classServer.html#a9">00458</a> <span class="keywordtype">bool</span> <a class="code" href="classServer.html#a9">Server::CommonChannels</a>(<a class="code" href="classuserrec.html">userrec</a>* u1, <a class="code" href="classuserrec.html">userrec</a>* u2)
00459 {
00460         <span class="keywordflow">return</span> (<a class="code" href="message_8h.html#a0">common_channels</a>(u1,u2) != 0);
00461 }
00462 
<a name="l00463"></a><a class="code" href="classServer.html#a10">00463</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a10">Server::SendCommon</a>(<a class="code" href="classuserrec.html">userrec</a>* User, std::string text,<span class="keywordtype">bool</span> IncludeSender)
00464 {
00465         <span class="keywordflow">if</span> (IncludeSender)
00466         {
00467                 WriteCommon(User,<span class="stringliteral">"%s"</span>,text.c_str());
00468         }
00469         <span class="keywordflow">else</span>
00470         {
00471                 WriteCommonExcept(User,<span class="stringliteral">"%s"</span>,text.c_str());
00472         }
00473 }
00474 
<a name="l00475"></a><a class="code" href="classServer.html#a11">00475</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a11">Server::SendWallops</a>(<a class="code" href="classuserrec.html">userrec</a>* User, std::string text)
00476 {
00477         WriteWallOps(User,<span class="keyword">false</span>,<span class="stringliteral">"%s"</span>,text.c_str());
00478 }
00479 
<a name="l00480"></a><a class="code" href="classServer.html#a32">00480</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a32">Server::ChangeHost</a>(<a class="code" href="classuserrec.html">userrec</a>* user, std::string host)
00481 {
00482         <a class="code" href="message_8h.html#a11">ChangeDisplayedHost</a>(user,host.c_str());
00483 }
00484 
<a name="l00485"></a><a class="code" href="classServer.html#a33">00485</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a33">Server::ChangeGECOS</a>(<a class="code" href="classuserrec.html">userrec</a>* user, std::string gecos)
00486 {
00487         <a class="code" href="message_8h.html#a10">ChangeName</a>(user,gecos.c_str());
00488 }
00489 
<a name="l00490"></a><a class="code" href="classServer.html#a12">00490</a> <span class="keywordtype">bool</span> <a class="code" href="classServer.html#a12">Server::IsNick</a>(std::string nick)
00491 {
00492         <span class="keywordflow">return</span> (<a class="code" href="message_8h.html#a13">isnick</a>(nick.c_str()) != 0);
00493 }
00494 
<a name="l00495"></a><a class="code" href="classServer.html#a14">00495</a> <a class="code" href="classuserrec.html">userrec</a>* <a class="code" href="classServer.html#a14">Server::FindNick</a>(std::string nick)
00496 {
00497         <span class="keywordflow">return</span> Find(nick);
00498 }
00499 
<a name="l00500"></a><a class="code" href="classServer.html#a15">00500</a> <a class="code" href="classchanrec.html">chanrec</a>* <a class="code" href="classServer.html#a15">Server::FindChannel</a>(std::string channel)
00501 {
00502         <span class="keywordflow">return</span> FindChan(channel.c_str());
00503 }
00504 
<a name="l00505"></a><a class="code" href="classServer.html#a16">00505</a> std::string <a class="code" href="classServer.html#a16">Server::ChanMode</a>(<a class="code" href="classuserrec.html">userrec</a>* User, <a class="code" href="classchanrec.html">chanrec</a>* Chan)
00506 {
00507         <span class="keywordflow">return</span> <a class="code" href="message_8h.html#a14">cmode</a>(User,Chan);
00508 }
00509 
<a name="l00510"></a><a class="code" href="classServer.html#a17">00510</a> <span class="keywordtype">bool</span> <a class="code" href="classServer.html#a17">Server::IsOnChannel</a>(<a class="code" href="classuserrec.html">userrec</a>* User, <a class="code" href="classchanrec.html">chanrec</a>* Chan)
00511 {
00512         <span class="keywordflow">return</span> <a class="code" href="message_8h.html#a16">has_channel</a>(User,Chan);
00513 }
00514 
<a name="l00515"></a><a class="code" href="classServer.html#a18">00515</a> std::string <a class="code" href="classServer.html#a18">Server::GetServerName</a>()
00516 {
00517         <span class="keywordflow">return</span> getservername();
00518 }
00519 
<a name="l00520"></a><a class="code" href="classServer.html#a19">00520</a> std::string <a class="code" href="classServer.html#a19">Server::GetNetworkName</a>()
00521 {
00522         <span class="keywordflow">return</span> getnetworkname();
00523 }
00524 
<a name="l00525"></a><a class="code" href="classServer.html#a20">00525</a> <a class="code" href="classAdmin.html">Admin</a> <a class="code" href="classServer.html#a20">Server::GetAdmin</a>()
00526 {
00527         <span class="keywordflow">return</span> <a class="code" href="classAdmin.html">Admin</a>(getadminname(),getadminemail(),getadminnick());
00528 }
00529 
00530 
00531 
<a name="l00532"></a><a class="code" href="classServer.html#a21">00532</a> <span class="keywordtype">bool</span> <a class="code" href="classServer.html#a21">Server::AddExtendedMode</a>(<span class="keywordtype">char</span> modechar, <span class="keywordtype">int</span> type, <span class="keywordtype">bool</span> requires_oper, <span class="keywordtype">int</span> params_when_on, <span class="keywordtype">int</span> params_when_off)
00533 {
00534         <span class="keywordflow">if</span> (type == <a class="code" href="modules_8h.html#a7">MT_SERVER</a>)
00535         {
00536                 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion"</span>);
00537                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
00538         }
00539         <span class="keywordflow">if</span> (((params_when_on&gt;0) || (params_when_off&gt;0)) &amp;&amp; (type == <a class="code" href="modules_8h.html#a6">MT_CLIENT</a>))
00540         {
00541                 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"*** API ERROR *** Parameters on MT_CLIENT modes are not supported"</span>);
00542                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
00543         }
00544         <span class="keywordflow">if</span> ((params_when_on&gt;1) || (params_when_off&gt;1))
00545         {
00546                 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported"</span>);
00547                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
00548         }
00549         <span class="keywordflow">return</span> <a class="code" href="modules_8cpp.html#a56">DoAddExtendedMode</a>(modechar,type,requires_oper,params_when_on,params_when_off);
00550 }
00551 
<a name="l00552"></a><a class="code" href="classServer.html#a22">00552</a> <span class="keywordtype">bool</span> <a class="code" href="classServer.html#a22">Server::AddExtendedListMode</a>(<span class="keywordtype">char</span> modechar)
00553 {
00554         <span class="keywordtype">bool</span> res = <a class="code" href="modules_8cpp.html#a56">DoAddExtendedMode</a>(modechar,<a class="code" href="modules_8h.html#a5">MT_CHANNEL</a>,<span class="keyword">false</span>,1,1);
00555         <span class="keywordflow">if</span> (res)
00556                 <a class="code" href="modules_8cpp.html#a57">ModeMakeList</a>(modechar);
00557         <span class="keywordflow">return</span> res;
00558 }
00559 
<a name="l00560"></a><a class="code" href="classServer.html#a13">00560</a> <span class="keywordtype">int</span> <a class="code" href="classServer.html#a13">Server::CountUsers</a>(<a class="code" href="classchanrec.html">chanrec</a>* c)
00561 {
00562         <span class="keywordflow">return</span> usercount(c);
00563 }
00564 
00565 
<a name="l00566"></a><a class="code" href="classConfigReader.html#a0">00566</a> <a class="code" href="classConfigReader.html#a0">ConfigReader::ConfigReader</a>()
00567 {
00568         this-&gt;<a class="code" href="classConfigReader.html#p0">cache</a> = <span class="keyword">new</span> std::stringstream(std::stringstream::in | std::stringstream::out);
00569         this-&gt;<a class="code" href="classConfigReader.html#p1">errorlog</a> = <span class="keyword">new</span> std::stringstream(std::stringstream::in | std::stringstream::out);
00570         this-&gt;<a class="code" href="classConfigReader.html#p2">readerror</a> = LoadConf(CONFIG_FILE,this-&gt;cache,this-&gt;errorlog);
00571         <span class="keywordflow">if</span> (!this-&gt;<a class="code" href="classConfigReader.html#p2">readerror</a>)
00572                 this-&gt;<a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a25">CONF_FILE_NOT_FOUND</a>;
00573 }
00574 
00575 
<a name="l00576"></a><a class="code" href="classConfigReader.html#a2">00576</a> <a class="code" href="classConfigReader.html#a2">ConfigReader::~ConfigReader</a>()
00577 {
00578         <span class="keywordflow">if</span> (this-&gt;<a class="code" href="classConfigReader.html#p0">cache</a>)
00579                 <span class="keyword">delete</span> this-&gt;<a class="code" href="classConfigReader.html#p0">cache</a>;
00580         <span class="keywordflow">if</span> (this-&gt;<a class="code" href="classConfigReader.html#p1">errorlog</a>)
00581                 <span class="keyword">delete</span> this-&gt;<a class="code" href="classConfigReader.html#p1">errorlog</a>;
00582 }
00583 
00584 
<a name="l00585"></a><a class="code" href="classConfigReader.html#a1">00585</a> <a class="code" href="classConfigReader.html#a0">ConfigReader::ConfigReader</a>(std::string filename)
00586 {
00587         this-&gt;<a class="code" href="classConfigReader.html#p0">cache</a> = <span class="keyword">new</span> std::stringstream(std::stringstream::in | std::stringstream::out);
00588         this-&gt;<a class="code" href="classConfigReader.html#p1">errorlog</a> = <span class="keyword">new</span> std::stringstream(std::stringstream::in | std::stringstream::out);
00589         this-&gt;<a class="code" href="classConfigReader.html#p2">readerror</a> = LoadConf(filename.c_str(),this-&gt;<a class="code" href="classConfigReader.html#p0">cache</a>,this-&gt;<a class="code" href="classConfigReader.html#p1">errorlog</a>);
00590         <span class="keywordflow">if</span> (!this-&gt;<a class="code" href="classConfigReader.html#p2">readerror</a>)
00591                 this-&gt;<a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a25">CONF_FILE_NOT_FOUND</a>;
00592 };
00593 
<a name="l00594"></a><a class="code" href="classConfigReader.html#a3">00594</a> std::string <a class="code" href="classConfigReader.html#a3">ConfigReader::ReadValue</a>(std::string tag, std::string name, <span class="keywordtype">int</span> index)
00595 {
00596         <span class="keywordtype">char</span> val[MAXBUF];
00597         <span class="keywordtype">char</span> t[MAXBUF];
00598         <span class="keywordtype">char</span> n[MAXBUF];
00599         strlcpy(t,tag.c_str(),MAXBUF);
00600         strlcpy(n,name.c_str(),MAXBUF);
00601         <span class="keywordtype">int</span> res = ReadConf(<a class="code" href="classConfigReader.html#p0">cache</a>,t,n,index,val);
00602         <span class="keywordflow">if</span> (!res)
00603         {
00604                 this-&gt;<a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a24">CONF_VALUE_NOT_FOUND</a>;
00605                 <span class="keywordflow">return</span> <span class="stringliteral">""</span>;
00606         }
00607         <span class="keywordflow">return</span> std::string(val);
00608 }
00609 
<a name="l00610"></a><a class="code" href="classConfigReader.html#a4">00610</a> <span class="keywordtype">bool</span> <a class="code" href="classConfigReader.html#a4">ConfigReader::ReadFlag</a>(std::string tag, std::string name, <span class="keywordtype">int</span> index)
00611 {
00612         <span class="keywordtype">char</span> val[MAXBUF];
00613         <span class="keywordtype">char</span> t[MAXBUF];
00614         <span class="keywordtype">char</span> n[MAXBUF];
00615         strlcpy(t,tag.c_str(),MAXBUF);
00616         strlcpy(n,name.c_str(),MAXBUF);
00617         <span class="keywordtype">int</span> res = ReadConf(<a class="code" href="classConfigReader.html#p0">cache</a>,t,n,index,val);
00618         <span class="keywordflow">if</span> (!res)
00619         {
00620                 this-&gt;<a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a24">CONF_VALUE_NOT_FOUND</a>;
00621                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
00622         }
00623         std::string s = val;
00624         <span class="keywordflow">return</span> ((s == <span class="stringliteral">"yes"</span>) || (s == <span class="stringliteral">"YES"</span>) || (s == <span class="stringliteral">"true"</span>) || (s == <span class="stringliteral">"TRUE"</span>) || (s == <span class="stringliteral">"1"</span>));
00625 }
00626 
<a name="l00627"></a><a class="code" href="classConfigReader.html#a5">00627</a> <span class="keywordtype">long</span> <a class="code" href="classConfigReader.html#a5">ConfigReader::ReadInteger</a>(std::string tag, std::string name, <span class="keywordtype">int</span> index, <span class="keywordtype">bool</span> needs_unsigned)
00628 {
00629         <span class="keywordtype">char</span> val[MAXBUF];
00630         <span class="keywordtype">char</span> t[MAXBUF];
00631         <span class="keywordtype">char</span> n[MAXBUF];
00632         strlcpy(t,tag.c_str(),MAXBUF);
00633         strlcpy(n,name.c_str(),MAXBUF);
00634         <span class="keywordtype">int</span> res = ReadConf(<a class="code" href="classConfigReader.html#p0">cache</a>,t,n,index,val);
00635         <span class="keywordflow">if</span> (!res)
00636         {
00637                 this-&gt;<a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a24">CONF_VALUE_NOT_FOUND</a>;
00638                 <span class="keywordflow">return</span> 0;
00639         }
00640         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; strlen(val); i++)
00641         {
00642                 <span class="keywordflow">if</span> (!isdigit(val[i]))
00643                 {
00644                         this-&gt;<a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a22">CONF_NOT_A_NUMBER</a>;
00645                         <span class="keywordflow">return</span> 0;
00646                 }
00647         }
00648         <span class="keywordflow">if</span> ((needs_unsigned) &amp;&amp; (atoi(val)&lt;0))
00649         {
00650                 this-&gt;<a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a23">CONF_NOT_UNSIGNED</a>;
00651                 <span class="keywordflow">return</span> 0;
00652         }
00653         <span class="keywordflow">return</span> atoi(val);
00654 }
00655 
<a name="l00656"></a><a class="code" href="classConfigReader.html#a6">00656</a> <span class="keywordtype">long</span> <a class="code" href="classConfigReader.html#a6">ConfigReader::GetError</a>()
00657 {
00658         <span class="keywordtype">long</span> olderr = this-&gt;<a class="code" href="classConfigReader.html#p3">error</a>;
00659         this-&gt;error = 0;
00660         <span class="keywordflow">return</span> olderr;
00661 }
00662 
<a name="l00663"></a><a class="code" href="classConfigReader.html#a9">00663</a> <span class="keywordtype">void</span> <a class="code" href="classConfigReader.html#a9">ConfigReader::DumpErrors</a>(<span class="keywordtype">bool</span> bail, <a class="code" href="classuserrec.html">userrec</a>* user)
00664 {
00665         <span class="keywordflow">if</span> (bail)
00666         {
00667                 printf(<span class="stringliteral">"There were errors in your configuration:\n%s"</span>,<a class="code" href="classConfigReader.html#p1">errorlog</a>-&gt;str().c_str());
00668                 exit(0);
00669         }
00670         <span class="keywordflow">else</span>
00671         {
00672                 <span class="keywordtype">char</span> dataline[1024];
00673                 <span class="keywordflow">if</span> (user)
00674                 {
00675                         WriteServ(user-&gt;<a class="code" href="classconnection.html#o0">fd</a>,<span class="stringliteral">"NOTICE %s :There were errors in the configuration file:"</span>,user-&gt;<a class="code" href="classuserrec.html#o0">nick</a>);
00676                         <span class="keywordflow">while</span> (!<a class="code" href="classConfigReader.html#p1">errorlog</a>-&gt;eof())
00677                         {
00678                                 <a class="code" href="classConfigReader.html#p1">errorlog</a>-&gt;getline(dataline,1024);
00679                                 WriteServ(user-&gt;<a class="code" href="classconnection.html#o0">fd</a>,<span class="stringliteral">"NOTICE %s :%s"</span>,user-&gt;<a class="code" href="classuserrec.html#o0">nick</a>,dataline);
00680                         }
00681                 }
00682                 <span class="keywordflow">else</span>
00683                 {
00684                         WriteOpers(<span class="stringliteral">"There were errors in the configuration file:"</span>,user-&gt;<a class="code" href="classuserrec.html#o0">nick</a>);
00685                         <span class="keywordflow">while</span> (!<a class="code" href="classConfigReader.html#p1">errorlog</a>-&gt;eof())
00686                         {
00687                                 <a class="code" href="classConfigReader.html#p1">errorlog</a>-&gt;getline(dataline,1024);
00688                                 WriteOpers(dataline);
00689                         }
00690                 }
00691                 <span class="keywordflow">return</span>;
00692         }
00693 }
00694 
00695 
<a name="l00696"></a><a class="code" href="classConfigReader.html#a7">00696</a> <span class="keywordtype">int</span> <a class="code" href="classConfigReader.html#a7">ConfigReader::Enumerate</a>(std::string tag)
00697 {
00698         <span class="keywordflow">return</span> EnumConf(<a class="code" href="classConfigReader.html#p0">cache</a>,tag.c_str());
00699 }
00700 
<a name="l00701"></a><a class="code" href="classConfigReader.html#a10">00701</a> <span class="keywordtype">int</span> <a class="code" href="classConfigReader.html#a10">ConfigReader::EnumerateValues</a>(std::string tag, <span class="keywordtype">int</span> index)
00702 {
00703         <span class="keywordflow">return</span> EnumValues(<a class="code" href="classConfigReader.html#p0">cache</a>, tag.c_str(), index);
00704 }
00705 
<a name="l00706"></a><a class="code" href="classConfigReader.html#a8">00706</a> <span class="keywordtype">bool</span> <a class="code" href="classConfigReader.html#a8">ConfigReader::Verify</a>()
00707 {
00708         <span class="keywordflow">return</span> this-&gt;<a class="code" href="classConfigReader.html#p2">readerror</a>;
00709 }
00710 
00711 
<a name="l00712"></a><a class="code" href="classFileReader.html#a1">00712</a> <a class="code" href="classFileReader.html#a0">FileReader::FileReader</a>(std::string filename)
00713 {
00714         <a class="code" href="modules_8h.html#a26">file_cache</a> c;
00715         readfile(c,filename.c_str());
00716         this-&gt;<a class="code" href="classFileReader.html#r0">fc</a> = c;
00717 }
00718 
<a name="l00719"></a><a class="code" href="classFileReader.html#a0">00719</a> <a class="code" href="classFileReader.html#a0">FileReader::FileReader</a>()
00720 {
00721 }
00722 
<a name="l00723"></a><a class="code" href="classFileReader.html#a3">00723</a> <span class="keywordtype">void</span> <a class="code" href="classFileReader.html#a3">FileReader::LoadFile</a>(std::string filename)
00724 {
00725         <a class="code" href="modules_8h.html#a26">file_cache</a> c;
00726         readfile(c,filename.c_str());
00727         this-&gt;<a class="code" href="classFileReader.html#r0">fc</a> = c;
00728 }
00729 
00730 
<a name="l00731"></a><a class="code" href="classFileReader.html#a2">00731</a> <a class="code" href="classFileReader.html#a2">FileReader::~FileReader</a>()
00732 {
00733 }
00734 
<a name="l00735"></a><a class="code" href="classFileReader.html#a4">00735</a> <span class="keywordtype">bool</span> <a class="code" href="classFileReader.html#a4">FileReader::Exists</a>()
00736 {
00737         <span class="keywordflow">if</span> (<a class="code" href="classFileReader.html#r0">fc</a>.size() == 0)
00738         {
00739                 <span class="keywordflow">return</span>(<span class="keyword">false</span>);
00740         }
00741         <span class="keywordflow">else</span>
00742         {
00743                 <span class="keywordflow">return</span>(<span class="keyword">true</span>);
00744         }
00745 }
00746 
<a name="l00747"></a><a class="code" href="classFileReader.html#a5">00747</a> std::string <a class="code" href="classFileReader.html#a5">FileReader::GetLine</a>(<span class="keywordtype">int</span> x)
00748 {
00749         <span class="keywordflow">if</span> ((x&lt;0) || (x&gt;<a class="code" href="classFileReader.html#r0">fc</a>.size()))
00750                 <span class="keywordflow">return</span> <span class="stringliteral">""</span>;
00751         <span class="keywordflow">return</span> <a class="code" href="classFileReader.html#r0">fc</a>[x];
00752 }
00753 
<a name="l00754"></a><a class="code" href="classFileReader.html#a6">00754</a> <span class="keywordtype">int</span> <a class="code" href="classFileReader.html#a6">FileReader::FileSize</a>()
00755 {
00756         <span class="keywordflow">return</span> <a class="code" href="classFileReader.html#r0">fc</a>.size();
00757 }
00758 
00759 
00760 std::vector&lt;Module*&gt; <a class="code" href="modules_8cpp.html#a58">modules</a>(255);
00761 std::vector&lt;ircd_module*&gt; <a class="code" href="modules_8cpp.html#a59">factory</a>(255);
00762 
<a name="l00763"></a><a class="code" href="modules_8cpp.html#a1">00763</a> <span class="keywordtype">int</span> <a class="code" href="modules_8cpp.html#a1">MODCOUNT</a>  = -1;
00764 
00765 
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Mar 25 03:49:28 2005 for InspIRCd by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
</a>1.3.3 </small></address>
</body>
</html>