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">
6 <!-- Generated by Doxygen 1.3-rc3 -->
8 <a class="qindex" href="main.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center>
9 <hr><h1>modules.cpp File Reference</h1><code>#include <typeinfo></code><br>
10 <code>#include <iostream></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 <code>#include "wildcard.h"</code><br>
16 <code>#include "mode.h"</code><br>
17 <code>#include "message.h"</code><br>
20 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>
21 <map name="modules.cpp_map">
22 <area href="modules_8h.html" shape="rect" coords="135,192,201,213" alt="">
23 <area href="ctables_8h.html" shape="rect" coords="17,168,79,189" alt="">
27 <a href="modules_8cpp-source.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0>
29 <tr><td colspan=2><br><h2>Compounds</h2></td></tr>
30 <tr><td nowrap align=right valign=top>class </td><td valign=bottom><a class="el" href="classExtMode.html">ExtMode</a></td></tr>
31 <tr><td colspan=2><br><h2>Typedefs</h2></td></tr>
32 <tr><td nowrap align=right valign=top>typedef std::vector< <a class="el" href="classExtMode.html">ExtMode</a> > </td><td valign=bottom><a class="el" href="modules_8cpp.html#a0">ExtModeList</a></td></tr>
33 <tr><td nowrap align=right valign=top>typedef ExtModeList::iterator </td><td valign=bottom><a class="el" href="modules_8cpp.html#a1">ExtModeListIter</a></td></tr>
34 <tr><td colspan=2><br><h2>Functions</h2></td></tr>
35 <tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="modules_8cpp.html#a4">ModeDefined</a> (char modechar, int type)</td></tr>
36 <tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="modules_8cpp.html#a5">ModeDefinedOper</a> (char modechar, int type)</td></tr>
37 <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="modules_8cpp.html#a6">ModeDefinedOn</a> (char modechar, int type)</td></tr>
38 <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="modules_8cpp.html#a7">ModeDefinedOff</a> (char modechar, int type)</td></tr>
39 <tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="modules_8cpp.html#a8">DoAddExtendedMode</a> (char modechar, int type, bool requires_oper, int params_on, int params_off)</td></tr>
40 <tr><td nowrap align=right valign=top>std::vector< <a class="el" href="classModule.html">Module</a> * > </td><td valign=bottom><a class="el" href="modules_8cpp.html#a9">modules</a> (255)</td></tr>
41 <tr><td nowrap align=right valign=top>std::vector< <a class="el" href="modules_8h.html#a12">ircd_module</a> * > </td><td valign=bottom><a class="el" href="modules_8cpp.html#a10">factory</a> (255)</td></tr>
42 <tr><td colspan=2><br><h2>Variables</h2></td></tr>
43 <tr><td nowrap align=right valign=top><a class="el" href="modules_8cpp.html#a0">ExtModeList</a> </td><td valign=bottom><a class="el" href="modules_8cpp.html#a2">EMode</a></td></tr>
44 <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="modules_8cpp.html#a3">MODCOUNT</a> = -1</td></tr>
46 <hr><h2>Typedef Documentation</h2>
47 <a name="a0" doxytag="modules.cpp::ExtModeList"></a><p>
48 <table width="100%" cellpadding="2" cellspacing="0" border="0">
51 <table cellpadding="0" cellspacing="0" border="0">
53 <td class="md" nowrap valign="top"> typedef std::vector<<a class="el" href="classExtMode.html">ExtMode</a>> ExtModeList
58 <table cellspacing=5 cellpadding=0 border=0>
68 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>. </td>
71 <a name="a1" doxytag="modules.cpp::ExtModeListIter"></a><p>
72 <table width="100%" cellpadding="2" cellspacing="0" border="0">
75 <table cellpadding="0" cellspacing="0" border="0">
77 <td class="md" nowrap valign="top"> typedef ExtModeList::iterator ExtModeListIter
82 <table cellspacing=5 cellpadding=0 border=0>
92 Definition at line <a class="el" href="modules_8cpp-source.html#l00032">32</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
94 Referenced by <a class="el" href="modules_8cpp-source.html#l00037">ModeDefined()</a>, <a class="el" href="modules_8cpp-source.html#l00079">ModeDefinedOff()</a>, <a class="el" href="modules_8cpp-source.html#l00066">ModeDefinedOn()</a>, and <a class="el" href="modules_8cpp-source.html#l00051">ModeDefinedOper()</a>. </td>
97 <hr><h2>Function Documentation</h2>
98 <a name="a8" doxytag="modules.cpp::DoAddExtendedMode"></a><p>
99 <table width="100%" cellpadding="2" cellspacing="0" border="0">
102 <table cellpadding="0" cellspacing="0" border="0">
104 <td class="md" nowrap valign="top"> bool DoAddExtendedMode </td>
105 <td class="md" valign="top">( </td>
106 <td class="md" nowrap valign="top">char </td>
107 <td class="mdname" nowrap> <em>modechar</em>, </td>
112 <td class="md" nowrap>int </td>
113 <td class="mdname" nowrap> <em>type</em>, </td>
118 <td class="md" nowrap>bool </td>
119 <td class="mdname" nowrap> <em>requires_oper</em>, </td>
124 <td class="md" nowrap>int </td>
125 <td class="mdname" nowrap> <em>params_on</em>, </td>
130 <td class="md" nowrap>int </td>
131 <td class="mdname" nowrap> <em>params_off</em></td>
135 <td class="md">) </td>
136 <td class="md" colspan="2"></td>
143 <table cellspacing=5 cellpadding=0 border=0>
153 Definition at line <a class="el" href="modules_8cpp-source.html#l00092">92</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
155 References <a class="el" href="modules_8cpp-source.html#l00034">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00037">ModeDefined()</a>.
157 Referenced by <a class="el" href="modules_8cpp-source.html#l00310">Server::AddExtendedMode()</a>.
159 <div class="fragment"><pre>00093 {
160 00094 <span class="keywordflow">if</span> (<a class="code" href="modules_8cpp.html#a4">ModeDefined</a>(modechar,type)) {
161 00095 <span class="keywordflow">return</span> <span class="keyword">false</span>;
163 00097 <a class="code" href="modules_8cpp.html#a2">EMode</a>.push_back(<a class="code" href="classExtMode.html">ExtMode</a>(modechar,type,requires_oper,params_on,params_off));
164 00098 <span class="keywordflow">return</span> <span class="keyword">true</span>;
169 <a name="a10" doxytag="modules.cpp::factory"></a><p>
170 <table width="100%" cellpadding="2" cellspacing="0" border="0">
173 <table cellpadding="0" cellspacing="0" border="0">
175 <td class="md" nowrap valign="top"> std::vector<<a class="el" href="modules_8h.html#a12">ircd_module</a>*> factory </td>
176 <td class="md" valign="top">( </td>
177 <td class="md" nowrap valign="top">255 </td>
178 <td class="mdname1" valign="top" nowrap> </td>
179 <td class="md" valign="top">) </td>
180 <td class="md" nowrap></td>
187 <table cellspacing=5 cellpadding=0 border=0>
198 <a name="a4" doxytag="modules.cpp::ModeDefined"></a><p>
199 <table width="100%" cellpadding="2" cellspacing="0" border="0">
202 <table cellpadding="0" cellspacing="0" border="0">
204 <td class="md" nowrap valign="top"> bool ModeDefined </td>
205 <td class="md" valign="top">( </td>
206 <td class="md" nowrap valign="top">char </td>
207 <td class="mdname" nowrap> <em>modechar</em>, </td>
212 <td class="md" nowrap>int </td>
213 <td class="mdname" nowrap> <em>type</em></td>
217 <td class="md">) </td>
218 <td class="md" colspan="2"></td>
225 <table cellspacing=5 cellpadding=0 border=0>
235 Definition at line <a class="el" href="modules_8cpp-source.html#l00037">37</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
237 References <a class="el" href="modules_8cpp-source.html#l00034">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00032">ExtModeListIter</a>.
239 Referenced by <a class="el" href="modules_8cpp-source.html#l00092">DoAddExtendedMode()</a>.
241 <div class="fragment"><pre>00038 {
242 00039 log(DEBUG,<span class="stringliteral">"Size of extmodes vector is %d"</span>,<a class="code" href="modules_8cpp.html#a2">EMode</a>.size());
243 00040 <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 < <a class="code" href="modules_8cpp.html#a2">EMode</a>.end(); i++)
245 00042 log(DEBUG,<span class="stringliteral">"i->modechar==%c, modechar=%c, i->type=%d, type=%d"</span>,i->modechar,modechar,i->type,type);
246 00043 <span class="keywordflow">if</span> ((i->modechar == modechar) && (i->type == type))
248 00045 <span class="keywordflow">return</span> <span class="keyword">true</span>;
251 00048 <span class="keywordflow">return</span> <span class="keyword">false</span>;
256 <a name="a7" doxytag="modules.cpp::ModeDefinedOff"></a><p>
257 <table width="100%" cellpadding="2" cellspacing="0" border="0">
260 <table cellpadding="0" cellspacing="0" border="0">
262 <td class="md" nowrap valign="top"> int ModeDefinedOff </td>
263 <td class="md" valign="top">( </td>
264 <td class="md" nowrap valign="top">char </td>
265 <td class="mdname" nowrap> <em>modechar</em>, </td>
270 <td class="md" nowrap>int </td>
271 <td class="mdname" nowrap> <em>type</em></td>
275 <td class="md">) </td>
276 <td class="md" colspan="2"></td>
283 <table cellspacing=5 cellpadding=0 border=0>
293 Definition at line <a class="el" href="modules_8cpp-source.html#l00079">79</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
295 References <a class="el" href="modules_8cpp-source.html#l00034">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00032">ExtModeListIter</a>.
297 <div class="fragment"><pre>00080 {
298 00081 <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 < <a class="code" href="modules_8cpp.html#a2">EMode</a>.end(); i++)
300 00083 <span class="keywordflow">if</span> ((i->modechar == modechar) && (i->type == type))
302 00085 <span class="keywordflow">return</span> i->params_when_off;
305 00088 <span class="keywordflow">return</span> 0;
310 <a name="a6" doxytag="modules.cpp::ModeDefinedOn"></a><p>
311 <table width="100%" cellpadding="2" cellspacing="0" border="0">
314 <table cellpadding="0" cellspacing="0" border="0">
316 <td class="md" nowrap valign="top"> int ModeDefinedOn </td>
317 <td class="md" valign="top">( </td>
318 <td class="md" nowrap valign="top">char </td>
319 <td class="mdname" nowrap> <em>modechar</em>, </td>
324 <td class="md" nowrap>int </td>
325 <td class="mdname" nowrap> <em>type</em></td>
329 <td class="md">) </td>
330 <td class="md" colspan="2"></td>
337 <table cellspacing=5 cellpadding=0 border=0>
347 Definition at line <a class="el" href="modules_8cpp-source.html#l00066">66</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
349 References <a class="el" href="modules_8cpp-source.html#l00034">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00032">ExtModeListIter</a>.
351 <div class="fragment"><pre>00067 {
352 00068 <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 < <a class="code" href="modules_8cpp.html#a2">EMode</a>.end(); i++)
354 00070 <span class="keywordflow">if</span> ((i->modechar == modechar) && (i->type == type))
356 00072 <span class="keywordflow">return</span> i->params_when_on;
359 00075 <span class="keywordflow">return</span> 0;
364 <a name="a5" doxytag="modules.cpp::ModeDefinedOper"></a><p>
365 <table width="100%" cellpadding="2" cellspacing="0" border="0">
368 <table cellpadding="0" cellspacing="0" border="0">
370 <td class="md" nowrap valign="top"> bool ModeDefinedOper </td>
371 <td class="md" valign="top">( </td>
372 <td class="md" nowrap valign="top">char </td>
373 <td class="mdname" nowrap> <em>modechar</em>, </td>
378 <td class="md" nowrap>int </td>
379 <td class="mdname" nowrap> <em>type</em></td>
383 <td class="md">) </td>
384 <td class="md" colspan="2"></td>
391 <table cellspacing=5 cellpadding=0 border=0>
401 Definition at line <a class="el" href="modules_8cpp-source.html#l00051">51</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
403 References <a class="el" href="modules_8cpp-source.html#l00034">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00032">ExtModeListIter</a>.
405 <div class="fragment"><pre>00052 {
406 00053 log(DEBUG,<span class="stringliteral">"Size of extmodes vector is %d"</span>,<a class="code" href="modules_8cpp.html#a2">EMode</a>.size());
407 00054 <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 < <a class="code" href="modules_8cpp.html#a2">EMode</a>.end(); i++)
409 00056 log(DEBUG,<span class="stringliteral">"i->modechar==%c, modechar=%c, i->type=%d, type=%d"</span>,i->modechar,modechar,i->type,type);
410 00057 <span class="keywordflow">if</span> ((i->modechar == modechar) && (i->type == type) && (i->needsoper == <span class="keyword">true</span>))
412 00059 <span class="keywordflow">return</span> <span class="keyword">true</span>;
415 00062 <span class="keywordflow">return</span> <span class="keyword">false</span>;
420 <a name="a9" doxytag="modules.cpp::modules"></a><p>
421 <table width="100%" cellpadding="2" cellspacing="0" border="0">
424 <table cellpadding="0" cellspacing="0" border="0">
426 <td class="md" nowrap valign="top"> std::vector<<a class="el" href="classModule.html">Module</a>*> modules </td>
427 <td class="md" valign="top">( </td>
428 <td class="md" nowrap valign="top">255 </td>
429 <td class="mdname1" valign="top" nowrap> </td>
430 <td class="md" valign="top">) </td>
431 <td class="md" nowrap></td>
438 <table cellspacing=5 cellpadding=0 border=0>
449 <hr><h2>Variable Documentation</h2>
450 <a name="a2" doxytag="modules.cpp::EMode"></a><p>
451 <table width="100%" cellpadding="2" cellspacing="0" border="0">
454 <table cellpadding="0" cellspacing="0" border="0">
456 <td class="md" nowrap valign="top"> <a class="el" href="modules_8cpp.html#a0">ExtModeList</a> EMode
461 <table cellspacing=5 cellpadding=0 border=0>
471 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>.
473 Referenced by <a class="el" href="modules_8cpp-source.html#l00092">DoAddExtendedMode()</a>, <a class="el" href="modules_8cpp-source.html#l00037">ModeDefined()</a>, <a class="el" href="modules_8cpp-source.html#l00079">ModeDefinedOff()</a>, <a class="el" href="modules_8cpp-source.html#l00066">ModeDefinedOn()</a>, and <a class="el" href="modules_8cpp-source.html#l00051">ModeDefinedOper()</a>. </td>
476 <a name="a3" doxytag="modules.cpp::MODCOUNT"></a><p>
477 <table width="100%" cellpadding="2" cellspacing="0" border="0">
480 <table cellpadding="0" cellspacing="0" border="0">
482 <td class="md" nowrap valign="top"> int MODCOUNT = -1
487 <table cellspacing=5 cellpadding=0 border=0>
497 Definition at line <a class="el" href="modules_8cpp-source.html#l00431">431</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. </td>
500 <hr><address style="align: right;"><small>Generated on Mon Apr 19 02:34:36 2004 for InspIRCd by
501 <a href="http://www.doxygen.org/index.html">
502 <img src="doxygen.png" alt="doxygen" align="middle" border=0
503 width=110 height=53></a>1.3-rc3 </small></address>