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>
18 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>
19 <map name="modules.cpp_map">
20 <area href="modules_8h.html" shape="rect" coords="255,224,321,245" alt="">
21 <area href="base_8h.html" shape="rect" coords="304,85,352,107" alt="">
22 <area href="ctables_8h.html" shape="rect" coords="415,155,476,176" alt="">
26 <a href="modules_8cpp-source.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0>
28 <tr><td colspan=2><br><h2>Compounds</h2></td></tr>
29 <tr><td nowrap align=right valign=top>class </td><td valign=bottom><a class="el" href="classExtMode.html">ExtMode</a></td></tr>
30 <tr><td colspan=2><br><h2>Typedefs</h2></td></tr>
31 <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>
32 <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>
33 <tr><td colspan=2><br><h2>Functions</h2></td></tr>
34 <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>
35 <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>
36 <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>
37 <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>
38 <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>
39 <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>
40 <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>
41 <tr><td colspan=2><br><h2>Variables</h2></td></tr>
42 <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>
43 <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>
45 <hr><h2>Typedef Documentation</h2>
46 <a name="a0" doxytag="modules.cpp::ExtModeList"></a><p>
47 <table width="100%" cellpadding="2" cellspacing="0" border="0">
50 <table cellpadding="0" cellspacing="0" border="0">
52 <td class="md" nowrap valign="top"> typedef std::vector<<a class="el" href="classExtMode.html">ExtMode</a>> ExtModeList
57 <table cellspacing=5 cellpadding=0 border=0>
67 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>. </td>
70 <a name="a1" doxytag="modules.cpp::ExtModeListIter"></a><p>
71 <table width="100%" cellpadding="2" cellspacing="0" border="0">
74 <table cellpadding="0" cellspacing="0" border="0">
76 <td class="md" nowrap valign="top"> typedef ExtModeList::iterator ExtModeListIter
81 <table cellspacing=5 cellpadding=0 border=0>
91 Definition at line <a class="el" href="modules_8cpp-source.html#l00030">30</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
93 Referenced by <a class="el" href="modules_8cpp-source.html#l00035">ModeDefined()</a>, <a class="el" href="modules_8cpp-source.html#l00077">ModeDefinedOff()</a>, <a class="el" href="modules_8cpp-source.html#l00064">ModeDefinedOn()</a>, and <a class="el" href="modules_8cpp-source.html#l00049">ModeDefinedOper()</a>. </td>
96 <hr><h2>Function Documentation</h2>
97 <a name="a8" doxytag="modules.cpp::DoAddExtendedMode"></a><p>
98 <table width="100%" cellpadding="2" cellspacing="0" border="0">
101 <table cellpadding="0" cellspacing="0" border="0">
103 <td class="md" nowrap valign="top"> bool DoAddExtendedMode </td>
104 <td class="md" valign="top">( </td>
105 <td class="md" nowrap valign="top">char </td>
106 <td class="mdname" nowrap> <em>modechar</em>, </td>
111 <td class="md" nowrap>int </td>
112 <td class="mdname" nowrap> <em>type</em>, </td>
117 <td class="md" nowrap>bool </td>
118 <td class="mdname" nowrap> <em>requires_oper</em>, </td>
123 <td class="md" nowrap>int </td>
124 <td class="mdname" nowrap> <em>params_on</em>, </td>
129 <td class="md" nowrap>int </td>
130 <td class="mdname" nowrap> <em>params_off</em></td>
134 <td class="md">) </td>
135 <td class="md" colspan="2"></td>
142 <table cellspacing=5 cellpadding=0 border=0>
152 Definition at line <a class="el" href="modules_8cpp-source.html#l00090">90</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
154 References <a class="el" href="modules_8cpp-source.html#l00032">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00035">ModeDefined()</a>.
156 Referenced by <a class="el" href="modules_8cpp-source.html#l00293">Server::AddExtendedMode()</a>.
158 <div class="fragment"><pre>00091 {
159 00092 <span class="keywordflow">if</span> (<a class="code" href="modules_8cpp.html#a4">ModeDefined</a>(modechar,type)) {
160 00093 <span class="keywordflow">return</span> <span class="keyword">false</span>;
162 00095 <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));
163 00096 <span class="keywordflow">return</span> <span class="keyword">true</span>;
168 <a name="a10" doxytag="modules.cpp::factory"></a><p>
169 <table width="100%" cellpadding="2" cellspacing="0" border="0">
172 <table cellpadding="0" cellspacing="0" border="0">
174 <td class="md" nowrap valign="top"> std::vector<<a class="el" href="modules_8h.html#a12">ircd_module</a>*> factory </td>
175 <td class="md" valign="top">( </td>
176 <td class="md" nowrap valign="top">255 </td>
177 <td class="mdname1" valign="top" nowrap> </td>
178 <td class="md" valign="top">) </td>
179 <td class="md" nowrap></td>
186 <table cellspacing=5 cellpadding=0 border=0>
197 <a name="a4" doxytag="modules.cpp::ModeDefined"></a><p>
198 <table width="100%" cellpadding="2" cellspacing="0" border="0">
201 <table cellpadding="0" cellspacing="0" border="0">
203 <td class="md" nowrap valign="top"> bool ModeDefined </td>
204 <td class="md" valign="top">( </td>
205 <td class="md" nowrap valign="top">char </td>
206 <td class="mdname" nowrap> <em>modechar</em>, </td>
211 <td class="md" nowrap>int </td>
212 <td class="mdname" nowrap> <em>type</em></td>
216 <td class="md">) </td>
217 <td class="md" colspan="2"></td>
224 <table cellspacing=5 cellpadding=0 border=0>
234 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>.
236 References <a class="el" href="modules_8cpp-source.html#l00032">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00030">ExtModeListIter</a>.
238 Referenced by <a class="el" href="modules_8cpp-source.html#l00090">DoAddExtendedMode()</a>.
240 <div class="fragment"><pre>00036 {
241 00037 log(DEBUG,<span class="stringliteral">"Size of extmodes vector is %d"</span>,<a class="code" href="modules_8cpp.html#a2">EMode</a>.size());
242 00038 <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++)
244 00040 log(DEBUG,<span class="stringliteral">"i->modechar==%c, modechar=%c, i->type=%d, type=%d"</span>,i->modechar,modechar,i->type,type);
245 00041 <span class="keywordflow">if</span> ((i->modechar == modechar) && (i->type == type))
247 00043 <span class="keywordflow">return</span> <span class="keyword">true</span>;
250 00046 <span class="keywordflow">return</span> <span class="keyword">false</span>;
255 <a name="a7" doxytag="modules.cpp::ModeDefinedOff"></a><p>
256 <table width="100%" cellpadding="2" cellspacing="0" border="0">
259 <table cellpadding="0" cellspacing="0" border="0">
261 <td class="md" nowrap valign="top"> int ModeDefinedOff </td>
262 <td class="md" valign="top">( </td>
263 <td class="md" nowrap valign="top">char </td>
264 <td class="mdname" nowrap> <em>modechar</em>, </td>
269 <td class="md" nowrap>int </td>
270 <td class="mdname" nowrap> <em>type</em></td>
274 <td class="md">) </td>
275 <td class="md" colspan="2"></td>
282 <table cellspacing=5 cellpadding=0 border=0>
292 Definition at line <a class="el" href="modules_8cpp-source.html#l00077">77</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
294 References <a class="el" href="modules_8cpp-source.html#l00032">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00030">ExtModeListIter</a>.
296 <div class="fragment"><pre>00078 {
297 00079 <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++)
299 00081 <span class="keywordflow">if</span> ((i->modechar == modechar) && (i->type == type))
301 00083 <span class="keywordflow">return</span> i->params_when_off;
304 00086 <span class="keywordflow">return</span> 0;
309 <a name="a6" doxytag="modules.cpp::ModeDefinedOn"></a><p>
310 <table width="100%" cellpadding="2" cellspacing="0" border="0">
313 <table cellpadding="0" cellspacing="0" border="0">
315 <td class="md" nowrap valign="top"> int ModeDefinedOn </td>
316 <td class="md" valign="top">( </td>
317 <td class="md" nowrap valign="top">char </td>
318 <td class="mdname" nowrap> <em>modechar</em>, </td>
323 <td class="md" nowrap>int </td>
324 <td class="mdname" nowrap> <em>type</em></td>
328 <td class="md">) </td>
329 <td class="md" colspan="2"></td>
336 <table cellspacing=5 cellpadding=0 border=0>
346 Definition at line <a class="el" href="modules_8cpp-source.html#l00064">64</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
348 References <a class="el" href="modules_8cpp-source.html#l00032">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00030">ExtModeListIter</a>.
350 <div class="fragment"><pre>00065 {
351 00066 <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++)
353 00068 <span class="keywordflow">if</span> ((i->modechar == modechar) && (i->type == type))
355 00070 <span class="keywordflow">return</span> i->params_when_on;
358 00073 <span class="keywordflow">return</span> 0;
363 <a name="a5" doxytag="modules.cpp::ModeDefinedOper"></a><p>
364 <table width="100%" cellpadding="2" cellspacing="0" border="0">
367 <table cellpadding="0" cellspacing="0" border="0">
369 <td class="md" nowrap valign="top"> bool ModeDefinedOper </td>
370 <td class="md" valign="top">( </td>
371 <td class="md" nowrap valign="top">char </td>
372 <td class="mdname" nowrap> <em>modechar</em>, </td>
377 <td class="md" nowrap>int </td>
378 <td class="mdname" nowrap> <em>type</em></td>
382 <td class="md">) </td>
383 <td class="md" colspan="2"></td>
390 <table cellspacing=5 cellpadding=0 border=0>
400 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>.
402 References <a class="el" href="modules_8cpp-source.html#l00032">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00030">ExtModeListIter</a>.
404 <div class="fragment"><pre>00050 {
405 00051 log(DEBUG,<span class="stringliteral">"Size of extmodes vector is %d"</span>,<a class="code" href="modules_8cpp.html#a2">EMode</a>.size());
406 00052 <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++)
408 00054 log(DEBUG,<span class="stringliteral">"i->modechar==%c, modechar=%c, i->type=%d, type=%d"</span>,i->modechar,modechar,i->type,type);
409 00055 <span class="keywordflow">if</span> ((i->modechar == modechar) && (i->type == type) && (i->needsoper == <span class="keyword">true</span>))
411 00057 <span class="keywordflow">return</span> <span class="keyword">true</span>;
414 00060 <span class="keywordflow">return</span> <span class="keyword">false</span>;
419 <a name="a9" doxytag="modules.cpp::modules"></a><p>
420 <table width="100%" cellpadding="2" cellspacing="0" border="0">
423 <table cellpadding="0" cellspacing="0" border="0">
425 <td class="md" nowrap valign="top"> std::vector<<a class="el" href="classModule.html">Module</a>*> modules </td>
426 <td class="md" valign="top">( </td>
427 <td class="md" nowrap valign="top">255 </td>
428 <td class="mdname1" valign="top" nowrap> </td>
429 <td class="md" valign="top">) </td>
430 <td class="md" nowrap></td>
437 <table cellspacing=5 cellpadding=0 border=0>
448 <hr><h2>Variable Documentation</h2>
449 <a name="a2" doxytag="modules.cpp::EMode"></a><p>
450 <table width="100%" cellpadding="2" cellspacing="0" border="0">
453 <table cellpadding="0" cellspacing="0" border="0">
455 <td class="md" nowrap valign="top"> <a class="el" href="modules_8cpp.html#a0">ExtModeList</a> EMode
460 <table cellspacing=5 cellpadding=0 border=0>
470 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>.
472 Referenced by <a class="el" href="modules_8cpp-source.html#l00090">DoAddExtendedMode()</a>, <a class="el" href="modules_8cpp-source.html#l00035">ModeDefined()</a>, <a class="el" href="modules_8cpp-source.html#l00077">ModeDefinedOff()</a>, <a class="el" href="modules_8cpp-source.html#l00064">ModeDefinedOn()</a>, and <a class="el" href="modules_8cpp-source.html#l00049">ModeDefinedOper()</a>. </td>
475 <a name="a3" doxytag="modules.cpp::MODCOUNT"></a><p>
476 <table width="100%" cellpadding="2" cellspacing="0" border="0">
479 <table cellpadding="0" cellspacing="0" border="0">
481 <td class="md" nowrap valign="top"> int MODCOUNT = -1
486 <table cellspacing=5 cellpadding=0 border=0>
496 Definition at line <a class="el" href="modules_8cpp-source.html#l00410">410</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. </td>
499 <hr><address style="align: right;"><small>Generated on Wed Apr 7 19:20:23 2004 for InspIRCd by
500 <a href="http://www.doxygen.org/index.html">
501 <img src="doxygen.png" alt="doxygen" align="middle" border=0
502 width=110 height=53></a>1.3-rc3 </small></address>