summaryrefslogtreecommitdiff
path: root/docs/module-doc/classchanrec.html
blob: 633651143573461510e89d8acb34494fa25655e5 (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
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
<!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>chanrec class Reference</title>
<link href="inspircd.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3-rc3 -->
<center>
<a class="qindex" href="main.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center>
<hr><h1>chanrec Class Reference</h1>Holds all relevent information for a channel. 
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="channels_8h-source.html">channels.h</a>&gt;</code>
<p>
Inheritance diagram for chanrec:<p><center><img src="classchanrec__inherit__graph.gif" border="0" usemap="#chanrec__inherit__map" alt="Inheritance graph"></center>
<map name="chanrec__inherit__map">
<area href="classclassbase.html" shape="rect" coords="7,16,73,37" alt="">
</map>
<center><font size="2">[<a target="top" href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for chanrec:<p><center><img src="classchanrec__coll__graph.gif" border="0" usemap="#chanrec__coll__map" alt="Collaboration graph"></center>
<map name="chanrec__coll__map">
<area href="classclassbase.html" shape="rect" coords="149,91,216,112" alt="">
</map>
<center><font size="2">[<a target="top" href="graph_legend.html">legend</a>]</font></center><a href="classchanrec-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classchanrec.html#a0">SetCustomMode</a> (char mode, bool mode_on)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Sets or unsets a custom mode in the channels info.</em> <a href="#a0"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classchanrec.html#a1">SetCustomModeParam</a> (char mode, char *parameter, bool mode_on)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Sets or unsets the parameters for a custom mode in a channels info.</em> <a href="#a1"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classchanrec.html#a2">IsCustomModeSet</a> (char mode)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Returns true if a custom mode is set on a channel.</em> <a href="#a2"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>std::string&nbsp;</td><td valign=bottom><a class="el" href="classchanrec.html#a3">GetModeParameter</a> (char mode)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Returns the parameter for a custom mode on a channel.</em> <a href="#a3"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classchanrec.html#a4">chanrec</a> ()</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Creates a channel record and initialises it with default values.</em> <a href="#a4"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual&nbsp;</td><td valign=bottom><a class="el" href="classchanrec.html#a5">~chanrec</a> ()</td></tr>
<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>
<tr><td nowrap align=right valign=top>char&nbsp;</td><td valign=bottom><a class="el" href="classchanrec.html#m0">name</a> [CHANMAX]</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>The channels name.</em> <a href="#m0"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>char&nbsp;</td><td valign=bottom><a class="el" href="classchanrec.html#m1">custom_modes</a> [MAXMODES]</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Custom modes for the channel.</em> <a href="#m1"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>char&nbsp;</td><td valign=bottom><a class="el" href="classchanrec.html#m2">topic</a> [MAXBUF]</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Channel topic.</em> <a href="#m2"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>time_t&nbsp;</td><td valign=bottom><a class="el" href="classchanrec.html#m3">created</a></td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Creation time.</em> <a href="#m3"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>time_t&nbsp;</td><td valign=bottom><a class="el" href="classchanrec.html#m4">topicset</a></td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Time topic was set.</em> <a href="#m4"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>char&nbsp;</td><td valign=bottom><a class="el" href="classchanrec.html#m5">setby</a> [NICKMAX]</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>The last user to set the topic.</em> <a href="#m5"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>long&nbsp;</td><td valign=bottom><a class="el" href="classchanrec.html#m6">limit</a></td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Contains the channel user limit.</em> <a href="#m6"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>char&nbsp;</td><td valign=bottom><a class="el" href="classchanrec.html#m7">key</a> [32]</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Contains the channel key.</em> <a href="#m7"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>short int&nbsp;</td><td valign=bottom><a class="el" href="classchanrec.html#m8">topiclock</a></td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Nonzero if the mode +t is set.</em> <a href="#m8"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>short int&nbsp;</td><td valign=bottom><a class="el" href="classchanrec.html#m9">noexternal</a></td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Nonzero if the mode +n is set.</em> <a href="#m9"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>short int&nbsp;</td><td valign=bottom><a class="el" href="classchanrec.html#m10">inviteonly</a></td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Nonzero if the mode +i is set.</em> <a href="#m10"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>short int&nbsp;</td><td valign=bottom><a class="el" href="classchanrec.html#m11">moderated</a></td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Nonzero if the mode +m is set.</em> <a href="#m11"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>short int&nbsp;</td><td valign=bottom><a class="el" href="classchanrec.html#m12">secret</a></td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Nonzero if the mode +s is set.</em> <a href="#m12"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>short int&nbsp;</td><td valign=bottom><a class="el" href="classchanrec.html#m13">c_private</a></td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Nonzero if the mode +p is set.</em> <a href="#m13"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="channels_8h.html#a5">BanList</a>&nbsp;</td><td valign=bottom><a class="el" href="classchanrec.html#m14">bans</a></td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>The list of all bans set on the channel.</em> <a href="#m14"></a><em></em></font><br><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Holds all relevent information for a channel.
<p>
This class represents a channel, and contains its name, modes, time created, topic, topic set time, etc, and an instance of the BanList type. 
<p>

<p>
Definition at line <a class="el" href="channels_8h-source.html#l00083">83</a> of file <a class="el" href="channels_8h-source.html">channels.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a name="a4" doxytag="chanrec::chanrec"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> chanrec::chanrec </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Creates a channel record and initialises it with default values.
<p>

<p>
Definition at line <a class="el" href="channels_8cpp-source.html#l00012">12</a> of file <a class="el" href="channels_8cpp-source.html">channels.cpp</a>.
<p>
References <a class="el" href="channels_8h-source.html#l00144">c_private</a>, <a class="el" href="channels_8h-source.html#l00100">created</a>, <a class="el" href="channels_8h-source.html#l00130">inviteonly</a>, <a class="el" href="channels_8h-source.html#l00113">limit</a>, <a class="el" href="channels_8h-source.html#l00134">moderated</a>, <a class="el" href="channels_8h-source.html#l00126">noexternal</a>, <a class="el" href="channels_8h-source.html#l00139">secret</a>, <a class="el" href="channels_8h-source.html#l00122">topiclock</a>, and <a class="el" href="channels_8h-source.html#l00104">topicset</a>.
<p>
<div class="fragment"><pre>00013 {
00014         strcpy(name,<span class="stringliteral">""</span>);
00015         strcpy(custom_modes,<span class="stringliteral">""</span>);
00016         strcpy(topic,<span class="stringliteral">""</span>);
00017         strcpy(setby,<span class="stringliteral">""</span>);
00018         strcpy(key,<span class="stringliteral">""</span>);
00019         <a class="code" href="classchanrec.html#m3">created</a> = <a class="code" href="classchanrec.html#m4">topicset</a> = <a class="code" href="classchanrec.html#m6">limit</a> = 0;
00020         <a class="code" href="classchanrec.html#m8">topiclock</a> = <a class="code" href="classchanrec.html#m9">noexternal</a> = <a class="code" href="classchanrec.html#m10">inviteonly</a> = <a class="code" href="classchanrec.html#m11">moderated</a> = <a class="code" href="classchanrec.html#m12">secret</a> = <a class="code" href="classchanrec.html#m13">c_private</a> = <span class="keyword">false</span>;
00021 }
</pre></div>    </td>
  </tr>
</table>
<a name="a5" doxytag="chanrec::~chanrec"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual chanrec::~chanrec </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [inline, virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="channels_8h-source.html#l00174">174</a> of file <a class="el" href="channels_8h-source.html">channels.h</a>.
<p>
<div class="fragment"><pre>00174 { <span class="comment">/* stub */</span> }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a name="a3" doxytag="chanrec::GetModeParameter"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> std::string chanrec::GetModeParameter </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">char&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>mode</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the parameter for a custom mode on a channel.
<p>
For example if "+L #foo" is set, and you pass this method 'L', it will return '#foo'. If the mode is not set on the channel, or the mode has no parameters associated with it, it will return an empty string.
<p>
Definition at line <a class="el" href="channels_8cpp-source.html#l00087">87</a> of file <a class="el" href="channels_8cpp-source.html">channels.cpp</a>.
<p>
References <a class="el" href="channels_8cpp-source.html#l00010">custom_mode_params</a>.
<p>
<div class="fragment"><pre>00088 {
00089         <span class="keywordflow">if</span> (<a class="code" href="channels_8cpp.html#a0">custom_mode_params</a>.size())
00090         {
00091                 <span class="keywordflow">for</span> (vector&lt;ModeParameter&gt;::iterator i = <a class="code" href="channels_8cpp.html#a0">custom_mode_params</a>.begin(); i &lt; <a class="code" href="channels_8cpp.html#a0">custom_mode_params</a>.end(); i++)
00092                 {
00093                         <span class="keywordflow">if</span> ((i-&gt;mode == mode) &amp;&amp; (!strcasecmp(this-&gt;name,i-&gt;channel)))
00094                         {
00095                                 <span class="keywordflow">return</span> std::string(i-&gt;parameter);
00096                         }
00097                 }
00098         }
00099         <span class="keywordflow">return</span> std::string(<span class="stringliteral">""</span>);
00100 }
</pre></div>    </td>
  </tr>
</table>
<a name="a2" doxytag="chanrec::IsCustomModeSet"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> bool chanrec::IsCustomModeSet </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">char&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>mode</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns true if a custom mode is set on a channel.
<p>

<p>
Definition at line <a class="el" href="channels_8cpp-source.html#l00081">81</a> of file <a class="el" href="channels_8cpp-source.html">channels.cpp</a>.
<p>
<div class="fragment"><pre>00082 {
00083         log(DEBUG,<span class="stringliteral">"Checking ISCustomModeSet: %c %s"</span>,mode,this-&gt;custom_modes);
00084         <span class="keywordflow">return</span> (strchr(this-&gt;custom_modes,mode) != 0);
00085 }
</pre></div>    </td>
  </tr>
</table>
<a name="a0" doxytag="chanrec::SetCustomMode"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void chanrec::SetCustomMode </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">char&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>mode</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>mode_on</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Sets or unsets a custom mode in the channels info.
<p>

<p>
Definition at line <a class="el" href="channels_8cpp-source.html#l00023">23</a> of file <a class="el" href="channels_8cpp-source.html">channels.cpp</a>.
<p>
References <a class="el" href="channels_8h-source.html#l00092">custom_modes</a>, and <a class="el" href="channels_8cpp-source.html#l00050">SetCustomModeParam()</a>.
<p>
<div class="fragment"><pre>00024 {
00025         <span class="keywordflow">if</span> (mode_on) {
00026                 <span class="keywordtype">char</span> m[3];
00027                 m[0] = mode;
00028                 m[1] = <span class="charliteral">'\0'</span>;
00029                 <span class="keywordflow">if</span> (!strchr(this-&gt;custom_modes,mode))
00030                 {
00031                         strncat(custom_modes,m,MAXMODES);
00032                 }
00033                 log(DEBUG,<span class="stringliteral">"Custom mode %c set"</span>,mode);
00034         }
00035         <span class="keywordflow">else</span> {
00036                 <span class="keywordtype">char</span> temp[MAXBUF];
00037                 <span class="keywordtype">int</span> count = 0;
00038                 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> q = 0; q &lt; strlen(custom_modes); q++) {
00039                         <span class="keywordflow">if</span> (<a class="code" href="classchanrec.html#m1">custom_modes</a>[q] != mode) {
00040                                 temp[count++] = mode;
00041                         }
00042                 }
00043                 temp[count] = <span class="charliteral">'\0'</span>;
00044                 strncpy(custom_modes,temp,MAXMODES);
00045                 log(DEBUG,<span class="stringliteral">"Custom mode %c removed"</span>,mode);
00046                 this-&gt;<a class="code" href="classchanrec.html#a1">SetCustomModeParam</a>(mode,<span class="stringliteral">""</span>,<span class="keyword">false</span>);
00047         }
00048 }
</pre></div>    </td>
  </tr>
</table>
<a name="a1" doxytag="chanrec::SetCustomModeParam"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void chanrec::SetCustomModeParam </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">char&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>mode</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>char *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>parameter</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>mode_on</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Sets or unsets the parameters for a custom mode in a channels info.
<p>

<p>
Definition at line <a class="el" href="channels_8cpp-source.html#l00050">50</a> of file <a class="el" href="channels_8cpp-source.html">channels.cpp</a>.
<p>
References <a class="el" href="channels_8h-source.html#l00064">ModeParameter::channel</a>, <a class="el" href="channels_8cpp-source.html#l00010">custom_mode_params</a>, <a class="el" href="channels_8h-source.html#l00062">ModeParameter::mode</a>, and <a class="el" href="channels_8h-source.html#l00063">ModeParameter::parameter</a>.
<p>
Referenced by <a class="el" href="channels_8cpp-source.html#l00023">SetCustomMode()</a>.
<p>
<div class="fragment"><pre>00051 {
00052 
00053         log(DEBUG,<span class="stringliteral">"SetCustomModeParam called"</span>);
00054         <a class="code" href="classModeParameter.html">ModeParameter</a> M;
00055         M.<a class="code" href="classModeParameter.html#m0">mode</a> = mode;
00056         strcpy(M.<a class="code" href="classModeParameter.html#m2">channel</a>,this-&gt;name);
00057         strcpy(M.<a class="code" href="classModeParameter.html#m1">parameter</a>,parameter);
00058         <span class="keywordflow">if</span> (mode_on)
00059         {
00060                 log(DEBUG,<span class="stringliteral">"Custom mode parameter %c %s added"</span>,mode,parameter);
00061                 <a class="code" href="channels_8cpp.html#a0">custom_mode_params</a>.push_back(M);
00062         }
00063         <span class="keywordflow">else</span>
00064         {
00065                 <span class="keywordflow">if</span> (<a class="code" href="channels_8cpp.html#a0">custom_mode_params</a>.size())
00066                 {
00067                         <span class="keywordflow">for</span> (vector&lt;ModeParameter&gt;::iterator i = <a class="code" href="channels_8cpp.html#a0">custom_mode_params</a>.begin(); i &lt; <a class="code" href="channels_8cpp.html#a0">custom_mode_params</a>.end(); i++)
00068                         {
00069                                 <span class="keywordflow">if</span> ((i-&gt;mode == mode) &amp;&amp; (!strcasecmp(this-&gt;name,i-&gt;channel)))
00070                                 {
00071                                         log(DEBUG,<span class="stringliteral">"Custom mode parameter %c %s removed"</span>,mode,parameter);
00072                                         <a class="code" href="channels_8cpp.html#a0">custom_mode_params</a>.erase(i);
00073                                         <span class="keywordflow">return</span>;
00074                                 }
00075                         }
00076                 }
00077                 log(DEBUG,<span class="stringliteral">"*** BUG *** Attempt to remove non-existent mode parameter!"</span>);
00078         }
00079 }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Member Data Documentation</h2>
<a name="m14" doxytag="chanrec::bans"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="channels_8h.html#a5">BanList</a> chanrec::bans
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The list of all bans set on the channel.
<p>

<p>
Definition at line <a class="el" href="channels_8h-source.html#l00148">148</a> of file <a class="el" href="channels_8h-source.html">channels.h</a>.    </td>
  </tr>
</table>
<a name="m13" doxytag="chanrec::c_private"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> short int chanrec::c_private
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Nonzero if the mode +p is set.
<p>
This value cannot be set at the same time as <a class="el" href="classchanrec.html#m12">chanrec::secret</a>
<p>
Definition at line <a class="el" href="channels_8h-source.html#l00144">144</a> of file <a class="el" href="channels_8h-source.html">channels.h</a>.
<p>
Referenced by <a class="el" href="channels_8cpp-source.html#l00012">chanrec()</a>.    </td>
  </tr>
</table>
<a name="m3" doxytag="chanrec::created"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> time_t chanrec::created
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Creation time.
<p>

<p>
Definition at line <a class="el" href="channels_8h-source.html#l00100">100</a> of file <a class="el" href="channels_8h-source.html">channels.h</a>.
<p>
Referenced by <a class="el" href="channels_8cpp-source.html#l00012">chanrec()</a>.    </td>
  </tr>
</table>
<a name="m1" doxytag="chanrec::custom_modes"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> char chanrec::custom_modes[MAXMODES]
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Custom modes for the channel.
<p>
Plugins may use this field in any way they see fit.
<p>
Definition at line <a class="el" href="channels_8h-source.html#l00092">92</a> of file <a class="el" href="channels_8h-source.html">channels.h</a>.
<p>
Referenced by <a class="el" href="channels_8cpp-source.html#l00023">SetCustomMode()</a>.    </td>
  </tr>
</table>
<a name="m10" doxytag="chanrec::inviteonly"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> short int chanrec::inviteonly
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Nonzero if the mode +i is set.
<p>

<p>
Definition at line <a class="el" href="channels_8h-source.html#l00130">130</a> of file <a class="el" href="channels_8h-source.html">channels.h</a>.
<p>
Referenced by <a class="el" href="channels_8cpp-source.html#l00012">chanrec()</a>.    </td>
  </tr>
</table>
<a name="m7" doxytag="chanrec::key"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> char chanrec::key[32]
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Contains the channel key.
<p>
If this value is an empty string, there is no channel key in place.
<p>
Definition at line <a class="el" href="channels_8h-source.html#l00118">118</a> of file <a class="el" href="channels_8h-source.html">channels.h</a>.    </td>
  </tr>
</table>
<a name="m6" doxytag="chanrec::limit"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> long chanrec::limit
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Contains the channel user limit.
<p>
If this value is zero, there is no limit in place.
<p>
Definition at line <a class="el" href="channels_8h-source.html#l00113">113</a> of file <a class="el" href="channels_8h-source.html">channels.h</a>.
<p>
Referenced by <a class="el" href="channels_8cpp-source.html#l00012">chanrec()</a>.    </td>
  </tr>
</table>
<a name="m11" doxytag="chanrec::moderated"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> short int chanrec::moderated
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Nonzero if the mode +m is set.
<p>

<p>
Definition at line <a class="el" href="channels_8h-source.html#l00134">134</a> of file <a class="el" href="channels_8h-source.html">channels.h</a>.
<p>
Referenced by <a class="el" href="channels_8cpp-source.html#l00012">chanrec()</a>.    </td>
  </tr>
</table>
<a name="m0" doxytag="chanrec::name"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> char chanrec::name[CHANMAX]
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The channels name.
<p>

<p>
Definition at line <a class="el" href="channels_8h-source.html#l00088">88</a> of file <a class="el" href="channels_8h-source.html">channels.h</a>.    </td>
  </tr>
</table>
<a name="m9" doxytag="chanrec::noexternal"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> short int chanrec::noexternal
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Nonzero if the mode +n is set.
<p>

<p>
Definition at line <a class="el" href="channels_8h-source.html#l00126">126</a> of file <a class="el" href="channels_8h-source.html">channels.h</a>.
<p>
Referenced by <a class="el" href="channels_8cpp-source.html#l00012">chanrec()</a>.    </td>
  </tr>
</table>
<a name="m12" doxytag="chanrec::secret"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> short int chanrec::secret
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Nonzero if the mode +s is set.
<p>
This value cannot be set at the same time as <a class="el" href="classchanrec.html#m13">chanrec::c_private</a>
<p>
Definition at line <a class="el" href="channels_8h-source.html#l00139">139</a> of file <a class="el" href="channels_8h-source.html">channels.h</a>.
<p>
Referenced by <a class="el" href="channels_8cpp-source.html#l00012">chanrec()</a>.    </td>
  </tr>
</table>
<a name="m5" doxytag="chanrec::setby"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> char chanrec::setby[NICKMAX]
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The last user to set the topic.
<p>
If this member is an empty string, no topic was ever set.
<p>
Definition at line <a class="el" href="channels_8h-source.html#l00108">108</a> of file <a class="el" href="channels_8h-source.html">channels.h</a>.    </td>
  </tr>
</table>
<a name="m2" doxytag="chanrec::topic"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> char chanrec::topic[MAXBUF]
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Channel topic.
<p>
If this is an empty string, no channel topic is set.
<p>
Definition at line <a class="el" href="channels_8h-source.html#l00097">97</a> of file <a class="el" href="channels_8h-source.html">channels.h</a>.    </td>
  </tr>
</table>
<a name="m8" doxytag="chanrec::topiclock"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> short int chanrec::topiclock
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Nonzero if the mode +t is set.
<p>

<p>
Definition at line <a class="el" href="channels_8h-source.html#l00122">122</a> of file <a class="el" href="channels_8h-source.html">channels.h</a>.
<p>
Referenced by <a class="el" href="channels_8cpp-source.html#l00012">chanrec()</a>.    </td>
  </tr>
</table>
<a name="m4" doxytag="chanrec::topicset"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> time_t chanrec::topicset
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Time topic was set.
<p>
If no topic was ever set, this will be equal to <a class="el" href="classchanrec.html#m3">chanrec::created</a>
<p>
Definition at line <a class="el" href="channels_8h-source.html#l00104">104</a> of file <a class="el" href="channels_8h-source.html">channels.h</a>.
<p>
Referenced by <a class="el" href="channels_8cpp-source.html#l00012">chanrec()</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="channels_8h-source.html">channels.h</a><li><a class="el" href="channels_8cpp-source.html">channels.cpp</a></ul>
<hr><address style="align: right;"><small>Generated on Tue Apr 6 21:13:44 2004 for InspIRCd by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 
width=110 height=53></a>1.3-rc3 </small></address>
</body>
</html>