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 "<a class="el" href="mode_8h-source.html">mode.h</a>"</code><br>
17 <code>#include "<a class="el" href="message_8h-source.html">message.h</a>"</code><br>
18 <code>#include "<a class="el" href="commands_8h-source.html">commands.h</a>"</code><br>
21 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>
22 <map name="modules.cpp_map">
23 <area href="mode_8h.html" shape="rect" coords="143,197,193,218" alt="">
24 <area href="message_8h.html" shape="rect" coords="132,333,204,354" alt="">
25 <area href="commands_8h.html" shape="rect" coords="127,378,209,400" alt="">
26 <area href="modules_8h.html" shape="rect" coords="135,5,201,26" alt="">
27 <area href="ctables_8h.html" shape="rect" coords="17,29,79,50" alt="">
31 <a href="modules_8cpp-source.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0>
33 <tr><td colspan=2><br><h2>Compounds</h2></td></tr>
34 <tr><td nowrap align=right valign=top>class </td><td valign=bottom><a class="el" href="classExtMode.html">ExtMode</a></td></tr>
35 <tr><td colspan=2><br><h2>Typedefs</h2></td></tr>
36 <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>
37 <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>
38 <tr><td colspan=2><br><h2>Functions</h2></td></tr>
39 <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>
40 <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>
41 <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>
42 <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>
43 <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>
44 <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>
45 <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>
46 <tr><td colspan=2><br><h2>Variables</h2></td></tr>
47 <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>
48 <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>
50 <hr><h2>Typedef Documentation</h2>
51 <a name="a0" doxytag="modules.cpp::ExtModeList"></a><p>
52 <table width="100%" cellpadding="2" cellspacing="0" border="0">
55 <table cellpadding="0" cellspacing="0" border="0">
57 <td class="md" nowrap valign="top"> typedef std::vector<<a class="el" href="classExtMode.html">ExtMode</a>> ExtModeList
62 <table cellspacing=5 cellpadding=0 border=0>
72 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>. </td>
75 <a name="a1" doxytag="modules.cpp::ExtModeListIter"></a><p>
76 <table width="100%" cellpadding="2" cellspacing="0" border="0">
79 <table cellpadding="0" cellspacing="0" border="0">
81 <td class="md" nowrap valign="top"> typedef ExtModeList::iterator ExtModeListIter
86 <table cellspacing=5 cellpadding=0 border=0>
96 Definition at line <a class="el" href="modules_8cpp-source.html#l00033">33</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
98 Referenced by <a class="el" href="modules_8cpp-source.html#l00038">ModeDefined()</a>, <a class="el" href="modules_8cpp-source.html#l00080">ModeDefinedOff()</a>, <a class="el" href="modules_8cpp-source.html#l00067">ModeDefinedOn()</a>, and <a class="el" href="modules_8cpp-source.html#l00052">ModeDefinedOper()</a>. </td>
101 <hr><h2>Function Documentation</h2>
102 <a name="a8" doxytag="modules.cpp::DoAddExtendedMode"></a><p>
103 <table width="100%" cellpadding="2" cellspacing="0" border="0">
106 <table cellpadding="0" cellspacing="0" border="0">
108 <td class="md" nowrap valign="top"> bool DoAddExtendedMode </td>
109 <td class="md" valign="top">( </td>
110 <td class="md" nowrap valign="top">char </td>
111 <td class="mdname" nowrap> <em>modechar</em>, </td>
116 <td class="md" nowrap>int </td>
117 <td class="mdname" nowrap> <em>type</em>, </td>
122 <td class="md" nowrap>bool </td>
123 <td class="mdname" nowrap> <em>requires_oper</em>, </td>
128 <td class="md" nowrap>int </td>
129 <td class="mdname" nowrap> <em>params_on</em>, </td>
134 <td class="md" nowrap>int </td>
135 <td class="mdname" nowrap> <em>params_off</em></td>
139 <td class="md">) </td>
140 <td class="md" colspan="2"></td>
147 <table cellspacing=5 cellpadding=0 border=0>
157 Definition at line <a class="el" href="modules_8cpp-source.html#l00093">93</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
159 References <a class="el" href="modules_8cpp-source.html#l00035">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00038">ModeDefined()</a>.
161 Referenced by <a class="el" href="modules_8cpp-source.html#l00317">Server::AddExtendedMode()</a>.
163 <div class="fragment"><pre>00094 {
164 00095 <span class="keywordflow">if</span> (<a class="code" href="modules_8cpp.html#a4">ModeDefined</a>(modechar,type)) {
165 00096 <span class="keywordflow">return</span> <span class="keyword">false</span>;
167 00098 <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));
168 00099 <span class="keywordflow">return</span> <span class="keyword">true</span>;
173 <a name="a10" doxytag="modules.cpp::factory"></a><p>
174 <table width="100%" cellpadding="2" cellspacing="0" border="0">
177 <table cellpadding="0" cellspacing="0" border="0">
179 <td class="md" nowrap valign="top"> std::vector<<a class="el" href="modules_8h.html#a12">ircd_module</a>*> factory </td>
180 <td class="md" valign="top">( </td>
181 <td class="md" nowrap valign="top">255 </td>
182 <td class="mdname1" valign="top" nowrap> </td>
183 <td class="md" valign="top">) </td>
184 <td class="md" nowrap></td>
191 <table cellspacing=5 cellpadding=0 border=0>
202 <a name="a4" doxytag="modules.cpp::ModeDefined"></a><p>
203 <table width="100%" cellpadding="2" cellspacing="0" border="0">
206 <table cellpadding="0" cellspacing="0" border="0">
208 <td class="md" nowrap valign="top"> bool ModeDefined </td>
209 <td class="md" valign="top">( </td>
210 <td class="md" nowrap valign="top">char </td>
211 <td class="mdname" nowrap> <em>modechar</em>, </td>
216 <td class="md" nowrap>int </td>
217 <td class="mdname" nowrap> <em>type</em></td>
221 <td class="md">) </td>
222 <td class="md" colspan="2"></td>
229 <table cellspacing=5 cellpadding=0 border=0>
239 Definition at line <a class="el" href="modules_8cpp-source.html#l00038">38</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
241 References <a class="el" href="modules_8cpp-source.html#l00035">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00033">ExtModeListIter</a>.
243 Referenced by <a class="el" href="modules_8cpp-source.html#l00093">DoAddExtendedMode()</a>.
245 <div class="fragment"><pre>00039 {
246 00040 log(DEBUG,<span class="stringliteral">"Size of extmodes vector is %d"</span>,<a class="code" href="modules_8cpp.html#a2">EMode</a>.size());
247 00041 <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++)
249 00043 log(DEBUG,<span class="stringliteral">"i->modechar==%c, modechar=%c, i->type=%d, type=%d"</span>,i->modechar,modechar,i->type,type);
250 00044 <span class="keywordflow">if</span> ((i->modechar == modechar) && (i->type == type))
252 00046 <span class="keywordflow">return</span> <span class="keyword">true</span>;
255 00049 <span class="keywordflow">return</span> <span class="keyword">false</span>;
260 <a name="a7" doxytag="modules.cpp::ModeDefinedOff"></a><p>
261 <table width="100%" cellpadding="2" cellspacing="0" border="0">
264 <table cellpadding="0" cellspacing="0" border="0">
266 <td class="md" nowrap valign="top"> int ModeDefinedOff </td>
267 <td class="md" valign="top">( </td>
268 <td class="md" nowrap valign="top">char </td>
269 <td class="mdname" nowrap> <em>modechar</em>, </td>
274 <td class="md" nowrap>int </td>
275 <td class="mdname" nowrap> <em>type</em></td>
279 <td class="md">) </td>
280 <td class="md" colspan="2"></td>
287 <table cellspacing=5 cellpadding=0 border=0>
297 Definition at line <a class="el" href="modules_8cpp-source.html#l00080">80</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
299 References <a class="el" href="modules_8cpp-source.html#l00035">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00033">ExtModeListIter</a>.
301 <div class="fragment"><pre>00081 {
302 00082 <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++)
304 00084 <span class="keywordflow">if</span> ((i->modechar == modechar) && (i->type == type))
306 00086 <span class="keywordflow">return</span> i->params_when_off;
309 00089 <span class="keywordflow">return</span> 0;
314 <a name="a6" doxytag="modules.cpp::ModeDefinedOn"></a><p>
315 <table width="100%" cellpadding="2" cellspacing="0" border="0">
318 <table cellpadding="0" cellspacing="0" border="0">
320 <td class="md" nowrap valign="top"> int ModeDefinedOn </td>
321 <td class="md" valign="top">( </td>
322 <td class="md" nowrap valign="top">char </td>
323 <td class="mdname" nowrap> <em>modechar</em>, </td>
328 <td class="md" nowrap>int </td>
329 <td class="mdname" nowrap> <em>type</em></td>
333 <td class="md">) </td>
334 <td class="md" colspan="2"></td>
341 <table cellspacing=5 cellpadding=0 border=0>
351 Definition at line <a class="el" href="modules_8cpp-source.html#l00067">67</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
353 References <a class="el" href="modules_8cpp-source.html#l00035">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00033">ExtModeListIter</a>.
355 <div class="fragment"><pre>00068 {
356 00069 <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++)
358 00071 <span class="keywordflow">if</span> ((i->modechar == modechar) && (i->type == type))
360 00073 <span class="keywordflow">return</span> i->params_when_on;
363 00076 <span class="keywordflow">return</span> 0;
368 <a name="a5" doxytag="modules.cpp::ModeDefinedOper"></a><p>
369 <table width="100%" cellpadding="2" cellspacing="0" border="0">
372 <table cellpadding="0" cellspacing="0" border="0">
374 <td class="md" nowrap valign="top"> bool ModeDefinedOper </td>
375 <td class="md" valign="top">( </td>
376 <td class="md" nowrap valign="top">char </td>
377 <td class="mdname" nowrap> <em>modechar</em>, </td>
382 <td class="md" nowrap>int </td>
383 <td class="mdname" nowrap> <em>type</em></td>
387 <td class="md">) </td>
388 <td class="md" colspan="2"></td>
395 <table cellspacing=5 cellpadding=0 border=0>
405 Definition at line <a class="el" href="modules_8cpp-source.html#l00052">52</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
407 References <a class="el" href="modules_8cpp-source.html#l00035">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00033">ExtModeListIter</a>.
409 <div class="fragment"><pre>00053 {
410 00054 log(DEBUG,<span class="stringliteral">"Size of extmodes vector is %d"</span>,<a class="code" href="modules_8cpp.html#a2">EMode</a>.size());
411 00055 <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++)
413 00057 log(DEBUG,<span class="stringliteral">"i->modechar==%c, modechar=%c, i->type=%d, type=%d"</span>,i->modechar,modechar,i->type,type);
414 00058 <span class="keywordflow">if</span> ((i->modechar == modechar) && (i->type == type) && (i->needsoper == <span class="keyword">true</span>))
416 00060 <span class="keywordflow">return</span> <span class="keyword">true</span>;
419 00063 <span class="keywordflow">return</span> <span class="keyword">false</span>;
424 <a name="a9" doxytag="modules.cpp::modules"></a><p>
425 <table width="100%" cellpadding="2" cellspacing="0" border="0">
428 <table cellpadding="0" cellspacing="0" border="0">
430 <td class="md" nowrap valign="top"> std::vector<<a class="el" href="classModule.html">Module</a>*> modules </td>
431 <td class="md" valign="top">( </td>
432 <td class="md" nowrap valign="top">255 </td>
433 <td class="mdname1" valign="top" nowrap> </td>
434 <td class="md" valign="top">) </td>
435 <td class="md" nowrap></td>
442 <table cellspacing=5 cellpadding=0 border=0>
453 <hr><h2>Variable Documentation</h2>
454 <a name="a2" doxytag="modules.cpp::EMode"></a><p>
455 <table width="100%" cellpadding="2" cellspacing="0" border="0">
458 <table cellpadding="0" cellspacing="0" border="0">
460 <td class="md" nowrap valign="top"> <a class="el" href="modules_8cpp.html#a0">ExtModeList</a> EMode
465 <table cellspacing=5 cellpadding=0 border=0>
475 Definition at line <a class="el" href="modules_8cpp-source.html#l00035">35</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
477 Referenced by <a class="el" href="modules_8cpp-source.html#l00093">DoAddExtendedMode()</a>, <a class="el" href="modules_8cpp-source.html#l00038">ModeDefined()</a>, <a class="el" href="modules_8cpp-source.html#l00080">ModeDefinedOff()</a>, <a class="el" href="modules_8cpp-source.html#l00067">ModeDefinedOn()</a>, and <a class="el" href="modules_8cpp-source.html#l00052">ModeDefinedOper()</a>. </td>
480 <a name="a3" doxytag="modules.cpp::MODCOUNT"></a><p>
481 <table width="100%" cellpadding="2" cellspacing="0" border="0">
484 <table cellpadding="0" cellspacing="0" border="0">
486 <td class="md" nowrap valign="top"> int MODCOUNT = -1
491 <table cellspacing=5 cellpadding=0 border=0>
501 Definition at line <a class="el" href="modules_8cpp-source.html#l00442">442</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. </td>
504 <hr><address style="align: right;"><small>Generated on Fri Apr 30 15:46:28 2004 for InspIRCd by
505 <a href="http://www.doxygen.org/index.html">
506 <img src="doxygen.png" alt="doxygen" align="middle" border=0
507 width=110 height=53></a>1.3-rc3 </small></address>