]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/modules_8cpp.html
Added support for module-defined chanmodes with no parameters
[user/henk/code/inspircd.git] / docs / module-doc / modules_8cpp.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3 <title>modules.cpp File Reference</title>
4 <link href="inspircd.css" rel="stylesheet" type="text/css">
5 </head><body>
6 <!-- Generated by Doxygen 1.3-rc3 -->
7 <center>
8 <a class="qindex" href="main.html">Main Page</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>
9 <hr><h1>modules.cpp File Reference</h1><code>#include &lt;typeinfo&gt;</code><br>
10 <code>#include &lt;iostream&gt;</code><br>
11 <code>#include "globals.h"</code><br>
12 <code>#include "<a class="el" href="modules_8h-source.html">modules.h</a>"</code><br>
13 <code>#include "<a class="el" href="ctables_8h-source.html">ctables.h</a>"</code><br>
14 <code>#include "inspircd_io.h"</code><br>
15
16 <p>
17 Include dependency graph for modules.cpp:<p><center><img src="modules_8cpp__incl.gif" border="0" usemap="#modules.cpp_map" alt="Include dependency graph"></center>
18 <map name="modules.cpp_map">
19 <area href="modules_8h.html" shape="rect" coords="255,224,321,245" alt="">
20 <area href="base_8h.html" shape="rect" coords="257,85,305,107" alt="">
21 <area href="ctables_8h.html" shape="rect" coords="368,155,429,176" alt="">
22 </map>
23
24 <p>
25 <a href="modules_8cpp-source.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0>
26 <tr><td></td></tr>
27 <tr><td colspan=2><br><h2>Compounds</h2></td></tr>
28 <tr><td nowrap align=right valign=top>class &nbsp;</td><td valign=bottom><a class="el" href="classExtMode.html">ExtMode</a></td></tr>
29 <tr><td colspan=2><br><h2>Typedefs</h2></td></tr>
30 <tr><td nowrap align=right valign=top>typedef std::vector&lt; <a class="el" href="classExtMode.html">ExtMode</a> &gt;&nbsp;</td><td valign=bottom><a class="el" href="modules_8cpp.html#a0">ExtModeList</a></td></tr>
31 <tr><td nowrap align=right valign=top>typedef ExtModeList::iterator&nbsp;</td><td valign=bottom><a class="el" href="modules_8cpp.html#a1">ExtModeListIter</a></td></tr>
32 <tr><td colspan=2><br><h2>Functions</h2></td></tr>
33 <tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="modules_8cpp.html#a4">ModeDefined</a> (char modechar, int type)</td></tr>
34 <tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="modules_8cpp.html#a5">ModeDefinedOn</a> (char modechar, int type)</td></tr>
35 <tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="modules_8cpp.html#a6">ModeDefinedOff</a> (char modechar, int type)</td></tr>
36 <tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="modules_8cpp.html#a7">DoAddExtendedMode</a> (char modechar, int type, bool default_on, int params_on, int params_off)</td></tr>
37 <tr><td nowrap align=right valign=top>std::vector&lt; <a class="el" href="classModule.html">Module</a> * &gt;&nbsp;</td><td valign=bottom><a class="el" href="modules_8cpp.html#a8">modules</a> (255)</td></tr>
38 <tr><td nowrap align=right valign=top>std::vector&lt; <a class="el" href="modules_8h.html#a12">ircd_module</a> * &gt;&nbsp;</td><td valign=bottom><a class="el" href="modules_8cpp.html#a9">factory</a> (255)</td></tr>
39 <tr><td colspan=2><br><h2>Variables</h2></td></tr>
40 <tr><td nowrap align=right valign=top><a class="el" href="modules_8cpp.html#a0">ExtModeList</a>&nbsp;</td><td valign=bottom><a class="el" href="modules_8cpp.html#a2">EMode</a></td></tr>
41 <tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="modules_8cpp.html#a3">MODCOUNT</a> = -1</td></tr>
42 </table>
43 <hr><h2>Typedef Documentation</h2>
44 <a name="a0" doxytag="modules.cpp::ExtModeList"></a><p>
45 <table width="100%" cellpadding="2" cellspacing="0" border="0">
46   <tr>
47     <td class="md">
48       <table cellpadding="0" cellspacing="0" border="0">
49         <tr>
50           <td class="md" nowrap valign="top"> typedef std::vector&lt;<a class="el" href="classExtMode.html">ExtMode</a>&gt; ExtModeList
51       </table>
52     </td>
53   </tr>
54 </table>
55 <table cellspacing=5 cellpadding=0 border=0>
56   <tr>
57     <td>
58       &nbsp;
59     </td>
60     <td>
61
62 <p>
63
64 <p>
65 Definition at line <a class="el" href="modules_8cpp-source.html#l00028">28</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.    </td>
66   </tr>
67 </table>
68 <a name="a1" doxytag="modules.cpp::ExtModeListIter"></a><p>
69 <table width="100%" cellpadding="2" cellspacing="0" border="0">
70   <tr>
71     <td class="md">
72       <table cellpadding="0" cellspacing="0" border="0">
73         <tr>
74           <td class="md" nowrap valign="top"> typedef ExtModeList::iterator ExtModeListIter
75       </table>
76     </td>
77   </tr>
78 </table>
79 <table cellspacing=5 cellpadding=0 border=0>
80   <tr>
81     <td>
82       &nbsp;
83     </td>
84     <td>
85
86 <p>
87
88 <p>
89 Definition at line <a class="el" href="modules_8cpp-source.html#l00029">29</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
90 <p>
91 Referenced by <a class="el" href="modules_8cpp-source.html#l00034">ModeDefined()</a>, <a class="el" href="modules_8cpp-source.html#l00062">ModeDefinedOff()</a>, and <a class="el" href="modules_8cpp-source.html#l00049">ModeDefinedOn()</a>.    </td>
92   </tr>
93 </table>
94 <hr><h2>Function Documentation</h2>
95 <a name="a7" doxytag="modules.cpp::DoAddExtendedMode"></a><p>
96 <table width="100%" cellpadding="2" cellspacing="0" border="0">
97   <tr>
98     <td class="md">
99       <table cellpadding="0" cellspacing="0" border="0">
100         <tr>
101           <td class="md" nowrap valign="top"> bool DoAddExtendedMode </td>
102           <td class="md" valign="top">(&nbsp;</td>
103           <td class="md" nowrap valign="top">char&nbsp;</td>
104           <td class="mdname" nowrap>&nbsp; <em>modechar</em>, </td>
105         </tr>
106         <tr>
107           <td></td>
108           <td></td>
109           <td class="md" nowrap>int&nbsp;</td>
110           <td class="mdname" nowrap>&nbsp; <em>type</em>, </td>
111         </tr>
112         <tr>
113           <td></td>
114           <td></td>
115           <td class="md" nowrap>bool&nbsp;</td>
116           <td class="mdname" nowrap>&nbsp; <em>default_on</em>, </td>
117         </tr>
118         <tr>
119           <td></td>
120           <td></td>
121           <td class="md" nowrap>int&nbsp;</td>
122           <td class="mdname" nowrap>&nbsp; <em>params_on</em>, </td>
123         </tr>
124         <tr>
125           <td></td>
126           <td></td>
127           <td class="md" nowrap>int&nbsp;</td>
128           <td class="mdname" nowrap>&nbsp; <em>params_off</em></td>
129         </tr>
130         <tr>
131           <td></td>
132           <td class="md">)&nbsp;</td>
133           <td class="md" colspan="2"></td>
134         </tr>
135
136       </table>
137     </td>
138   </tr>
139 </table>
140 <table cellspacing=5 cellpadding=0 border=0>
141   <tr>
142     <td>
143       &nbsp;
144     </td>
145     <td>
146
147 <p>
148
149 <p>
150 Definition at line <a class="el" href="modules_8cpp-source.html#l00075">75</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
151 <p>
152 References <a class="el" href="modules_8cpp-source.html#l00031">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00034">ModeDefined()</a>.
153 <p>
154 Referenced by <a class="el" href="modules_8cpp-source.html#l00230">Server::AddExtendedMode()</a>.
155 <p>
156 <div class="fragment"><pre>00076 {
157 00077         <span class="keywordflow">if</span> (<a class="code" href="modules_8cpp.html#a4">ModeDefined</a>(modechar,type)) {
158 00078                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
159 00079         }
160 00080         <a class="code" href="modules_8cpp.html#a2">EMode</a>.push_back(<a class="code" href="classExtMode.html">ExtMode</a>(modechar,type,default_on,params_on,params_off));
161 00081         <span class="keywordflow">return</span> <span class="keyword">true</span>;
162 00082 }
163 </pre></div>    </td>
164   </tr>
165 </table>
166 <a name="a9" doxytag="modules.cpp::factory"></a><p>
167 <table width="100%" cellpadding="2" cellspacing="0" border="0">
168   <tr>
169     <td class="md">
170       <table cellpadding="0" cellspacing="0" border="0">
171         <tr>
172           <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="modules_8h.html#a12">ircd_module</a>*&gt; factory </td>
173           <td class="md" valign="top">(&nbsp;</td>
174           <td class="md" nowrap valign="top">255&nbsp;</td>
175           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
176           <td class="md" valign="top">)&nbsp;</td>
177           <td class="md" nowrap></td>
178         </tr>
179
180       </table>
181     </td>
182   </tr>
183 </table>
184 <table cellspacing=5 cellpadding=0 border=0>
185   <tr>
186     <td>
187       &nbsp;
188     </td>
189     <td>
190
191 <p>
192     </td>
193   </tr>
194 </table>
195 <a name="a4" doxytag="modules.cpp::ModeDefined"></a><p>
196 <table width="100%" cellpadding="2" cellspacing="0" border="0">
197   <tr>
198     <td class="md">
199       <table cellpadding="0" cellspacing="0" border="0">
200         <tr>
201           <td class="md" nowrap valign="top"> bool ModeDefined </td>
202           <td class="md" valign="top">(&nbsp;</td>
203           <td class="md" nowrap valign="top">char&nbsp;</td>
204           <td class="mdname" nowrap>&nbsp; <em>modechar</em>, </td>
205         </tr>
206         <tr>
207           <td></td>
208           <td></td>
209           <td class="md" nowrap>int&nbsp;</td>
210           <td class="mdname" nowrap>&nbsp; <em>type</em></td>
211         </tr>
212         <tr>
213           <td></td>
214           <td class="md">)&nbsp;</td>
215           <td class="md" colspan="2"></td>
216         </tr>
217
218       </table>
219     </td>
220   </tr>
221 </table>
222 <table cellspacing=5 cellpadding=0 border=0>
223   <tr>
224     <td>
225       &nbsp;
226     </td>
227     <td>
228
229 <p>
230
231 <p>
232 Definition at line <a class="el" href="modules_8cpp-source.html#l00034">34</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
233 <p>
234 References <a class="el" href="modules_8cpp-source.html#l00031">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00029">ExtModeListIter</a>.
235 <p>
236 Referenced by <a class="el" href="modules_8cpp-source.html#l00075">DoAddExtendedMode()</a>.
237 <p>
238 <div class="fragment"><pre>00035 {
239 00036         log(DEBUG,<span class="stringliteral">"Size of extmodes vector is %d"</span>,<a class="code" href="modules_8cpp.html#a2">EMode</a>.size());
240 00037         <span class="keywordflow">for</span> (<a class="code" href="modules_8cpp.html#a1">ExtModeListIter</a> i = <a class="code" href="modules_8cpp.html#a2">EMode</a>.begin(); i &lt; <a class="code" href="modules_8cpp.html#a2">EMode</a>.end(); i++)
241 00038         {
242 00039                 log(DEBUG,<span class="stringliteral">"i-&gt;modechar==%c, modechar=%c, i-&gt;type=%d, type=%d"</span>,i-&gt;modechar,modechar,i-&gt;type,type);
243 00040                 <span class="keywordflow">if</span> ((i-&gt;modechar == modechar) &amp;&amp; (i-&gt;type == type))
244 00041                 {
245 00042                         <span class="keywordflow">return</span> <span class="keyword">true</span>;
246 00043                 }
247 00044         }
248 00045         <span class="keywordflow">return</span> <span class="keyword">false</span>;
249 00046 }
250 </pre></div>    </td>
251   </tr>
252 </table>
253 <a name="a6" doxytag="modules.cpp::ModeDefinedOff"></a><p>
254 <table width="100%" cellpadding="2" cellspacing="0" border="0">
255   <tr>
256     <td class="md">
257       <table cellpadding="0" cellspacing="0" border="0">
258         <tr>
259           <td class="md" nowrap valign="top"> int ModeDefinedOff </td>
260           <td class="md" valign="top">(&nbsp;</td>
261           <td class="md" nowrap valign="top">char&nbsp;</td>
262           <td class="mdname" nowrap>&nbsp; <em>modechar</em>, </td>
263         </tr>
264         <tr>
265           <td></td>
266           <td></td>
267           <td class="md" nowrap>int&nbsp;</td>
268           <td class="mdname" nowrap>&nbsp; <em>type</em></td>
269         </tr>
270         <tr>
271           <td></td>
272           <td class="md">)&nbsp;</td>
273           <td class="md" colspan="2"></td>
274         </tr>
275
276       </table>
277     </td>
278   </tr>
279 </table>
280 <table cellspacing=5 cellpadding=0 border=0>
281   <tr>
282     <td>
283       &nbsp;
284     </td>
285     <td>
286
287 <p>
288
289 <p>
290 Definition at line <a class="el" href="modules_8cpp-source.html#l00062">62</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
291 <p>
292 References <a class="el" href="modules_8cpp-source.html#l00031">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00029">ExtModeListIter</a>.
293 <p>
294 <div class="fragment"><pre>00063 {
295 00064         <span class="keywordflow">for</span> (<a class="code" href="modules_8cpp.html#a1">ExtModeListIter</a> i = <a class="code" href="modules_8cpp.html#a2">EMode</a>.begin(); i &lt; <a class="code" href="modules_8cpp.html#a2">EMode</a>.end(); i++)
296 00065         {
297 00066                 <span class="keywordflow">if</span> ((i-&gt;modechar == modechar) &amp;&amp; (i-&gt;type == type))
298 00067                 {
299 00068                         <span class="keywordflow">return</span> i-&gt;params_when_off;
300 00069                 }
301 00070         }
302 00071         <span class="keywordflow">return</span> 0;
303 00072 }
304 </pre></div>    </td>
305   </tr>
306 </table>
307 <a name="a5" doxytag="modules.cpp::ModeDefinedOn"></a><p>
308 <table width="100%" cellpadding="2" cellspacing="0" border="0">
309   <tr>
310     <td class="md">
311       <table cellpadding="0" cellspacing="0" border="0">
312         <tr>
313           <td class="md" nowrap valign="top"> int ModeDefinedOn </td>
314           <td class="md" valign="top">(&nbsp;</td>
315           <td class="md" nowrap valign="top">char&nbsp;</td>
316           <td class="mdname" nowrap>&nbsp; <em>modechar</em>, </td>
317         </tr>
318         <tr>
319           <td></td>
320           <td></td>
321           <td class="md" nowrap>int&nbsp;</td>
322           <td class="mdname" nowrap>&nbsp; <em>type</em></td>
323         </tr>
324         <tr>
325           <td></td>
326           <td class="md">)&nbsp;</td>
327           <td class="md" colspan="2"></td>
328         </tr>
329
330       </table>
331     </td>
332   </tr>
333 </table>
334 <table cellspacing=5 cellpadding=0 border=0>
335   <tr>
336     <td>
337       &nbsp;
338     </td>
339     <td>
340
341 <p>
342
343 <p>
344 Definition at line <a class="el" href="modules_8cpp-source.html#l00049">49</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
345 <p>
346 References <a class="el" href="modules_8cpp-source.html#l00031">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00029">ExtModeListIter</a>.
347 <p>
348 <div class="fragment"><pre>00050 {
349 00051         <span class="keywordflow">for</span> (<a class="code" href="modules_8cpp.html#a1">ExtModeListIter</a> i = <a class="code" href="modules_8cpp.html#a2">EMode</a>.begin(); i &lt; <a class="code" href="modules_8cpp.html#a2">EMode</a>.end(); i++)
350 00052         {
351 00053                 <span class="keywordflow">if</span> ((i-&gt;modechar == modechar) &amp;&amp; (i-&gt;type == type))
352 00054                 {
353 00055                         <span class="keywordflow">return</span> i-&gt;params_when_on;
354 00056                 }
355 00057         }
356 00058         <span class="keywordflow">return</span> 0;
357 00059 }
358 </pre></div>    </td>
359   </tr>
360 </table>
361 <a name="a8" doxytag="modules.cpp::modules"></a><p>
362 <table width="100%" cellpadding="2" cellspacing="0" border="0">
363   <tr>
364     <td class="md">
365       <table cellpadding="0" cellspacing="0" border="0">
366         <tr>
367           <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classModule.html">Module</a>*&gt; modules </td>
368           <td class="md" valign="top">(&nbsp;</td>
369           <td class="md" nowrap valign="top">255&nbsp;</td>
370           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
371           <td class="md" valign="top">)&nbsp;</td>
372           <td class="md" nowrap></td>
373         </tr>
374
375       </table>
376     </td>
377   </tr>
378 </table>
379 <table cellspacing=5 cellpadding=0 border=0>
380   <tr>
381     <td>
382       &nbsp;
383     </td>
384     <td>
385
386 <p>
387     </td>
388   </tr>
389 </table>
390 <hr><h2>Variable Documentation</h2>
391 <a name="a2" doxytag="modules.cpp::EMode"></a><p>
392 <table width="100%" cellpadding="2" cellspacing="0" border="0">
393   <tr>
394     <td class="md">
395       <table cellpadding="0" cellspacing="0" border="0">
396         <tr>
397           <td class="md" nowrap valign="top"> <a class="el" href="modules_8cpp.html#a0">ExtModeList</a> EMode
398       </table>
399     </td>
400   </tr>
401 </table>
402 <table cellspacing=5 cellpadding=0 border=0>
403   <tr>
404     <td>
405       &nbsp;
406     </td>
407     <td>
408
409 <p>
410
411 <p>
412 Definition at line <a class="el" href="modules_8cpp-source.html#l00031">31</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
413 <p>
414 Referenced by <a class="el" href="modules_8cpp-source.html#l00075">DoAddExtendedMode()</a>, <a class="el" href="modules_8cpp-source.html#l00034">ModeDefined()</a>, <a class="el" href="modules_8cpp-source.html#l00062">ModeDefinedOff()</a>, and <a class="el" href="modules_8cpp-source.html#l00049">ModeDefinedOn()</a>.    </td>
415   </tr>
416 </table>
417 <a name="a3" doxytag="modules.cpp::MODCOUNT"></a><p>
418 <table width="100%" cellpadding="2" cellspacing="0" border="0">
419   <tr>
420     <td class="md">
421       <table cellpadding="0" cellspacing="0" border="0">
422         <tr>
423           <td class="md" nowrap valign="top"> int MODCOUNT = -1
424       </table>
425     </td>
426   </tr>
427 </table>
428 <table cellspacing=5 cellpadding=0 border=0>
429   <tr>
430     <td>
431       &nbsp;
432     </td>
433     <td>
434
435 <p>
436
437 <p>
438 Definition at line <a class="el" href="modules_8cpp-source.html#l00320">320</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.    </td>
439   </tr>
440 </table>
441 <hr><address style="align: right;"><small>Generated on Sat Apr 3 16:36:06 2004 for InspIRCd by
442 <a href="http://www.doxygen.org/index.html">
443 <img src="doxygen.png" alt="doxygen" align="middle" border=0 
444 width=110 height=53></a>1.3-rc3 </small></address>
445 </body>
446 </html>