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="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>
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="">
25 <a href="modules_8cpp-source.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0>
27 <tr><td colspan=2><br><h2>Compounds</h2></td></tr>
28 <tr><td nowrap align=right valign=top>class </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< <a class="el" href="classExtMode.html">ExtMode</a> > </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 </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 </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 </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 </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 </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< <a class="el" href="classModule.html">Module</a> * > </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< <a class="el" href="modules_8h.html#a12">ircd_module</a> * > </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> </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 </td><td valign=bottom><a class="el" href="modules_8cpp.html#a3">MODCOUNT</a> = -1</td></tr>
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">
48 <table cellpadding="0" cellspacing="0" border="0">
50 <td class="md" nowrap valign="top"> typedef std::vector<<a class="el" href="classExtMode.html">ExtMode</a>> ExtModeList
55 <table cellspacing=5 cellpadding=0 border=0>
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>
68 <a name="a1" doxytag="modules.cpp::ExtModeListIter"></a><p>
69 <table width="100%" cellpadding="2" cellspacing="0" border="0">
72 <table cellpadding="0" cellspacing="0" border="0">
74 <td class="md" nowrap valign="top"> typedef ExtModeList::iterator ExtModeListIter
79 <table cellspacing=5 cellpadding=0 border=0>
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>.
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>
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">
99 <table cellpadding="0" cellspacing="0" border="0">
101 <td class="md" nowrap valign="top"> bool DoAddExtendedMode </td>
102 <td class="md" valign="top">( </td>
103 <td class="md" nowrap valign="top">char </td>
104 <td class="mdname" nowrap> <em>modechar</em>, </td>
109 <td class="md" nowrap>int </td>
110 <td class="mdname" nowrap> <em>type</em>, </td>
115 <td class="md" nowrap>bool </td>
116 <td class="mdname" nowrap> <em>default_on</em>, </td>
121 <td class="md" nowrap>int </td>
122 <td class="mdname" nowrap> <em>params_on</em>, </td>
127 <td class="md" nowrap>int </td>
128 <td class="mdname" nowrap> <em>params_off</em></td>
132 <td class="md">) </td>
133 <td class="md" colspan="2"></td>
140 <table cellspacing=5 cellpadding=0 border=0>
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>.
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>.
154 Referenced by <a class="el" href="modules_8cpp-source.html#l00230">Server::AddExtendedMode()</a>.
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>;
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>;
166 <a name="a9" doxytag="modules.cpp::factory"></a><p>
167 <table width="100%" cellpadding="2" cellspacing="0" border="0">
170 <table cellpadding="0" cellspacing="0" border="0">
172 <td class="md" nowrap valign="top"> std::vector<<a class="el" href="modules_8h.html#a12">ircd_module</a>*> factory </td>
173 <td class="md" valign="top">( </td>
174 <td class="md" nowrap valign="top">255 </td>
175 <td class="mdname1" valign="top" nowrap> </td>
176 <td class="md" valign="top">) </td>
177 <td class="md" nowrap></td>
184 <table cellspacing=5 cellpadding=0 border=0>
195 <a name="a4" doxytag="modules.cpp::ModeDefined"></a><p>
196 <table width="100%" cellpadding="2" cellspacing="0" border="0">
199 <table cellpadding="0" cellspacing="0" border="0">
201 <td class="md" nowrap valign="top"> bool ModeDefined </td>
202 <td class="md" valign="top">( </td>
203 <td class="md" nowrap valign="top">char </td>
204 <td class="mdname" nowrap> <em>modechar</em>, </td>
209 <td class="md" nowrap>int </td>
210 <td class="mdname" nowrap> <em>type</em></td>
214 <td class="md">) </td>
215 <td class="md" colspan="2"></td>
222 <table cellspacing=5 cellpadding=0 border=0>
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>.
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>.
236 Referenced by <a class="el" href="modules_8cpp-source.html#l00075">DoAddExtendedMode()</a>.
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 < <a class="code" href="modules_8cpp.html#a2">EMode</a>.end(); i++)
242 00039 log(DEBUG,<span class="stringliteral">"i->modechar==%c, modechar=%c, i->type=%d, type=%d"</span>,i->modechar,modechar,i->type,type);
243 00040 <span class="keywordflow">if</span> ((i->modechar == modechar) && (i->type == type))
245 00042 <span class="keywordflow">return</span> <span class="keyword">true</span>;
248 00045 <span class="keywordflow">return</span> <span class="keyword">false</span>;
253 <a name="a6" doxytag="modules.cpp::ModeDefinedOff"></a><p>
254 <table width="100%" cellpadding="2" cellspacing="0" border="0">
257 <table cellpadding="0" cellspacing="0" border="0">
259 <td class="md" nowrap valign="top"> int ModeDefinedOff </td>
260 <td class="md" valign="top">( </td>
261 <td class="md" nowrap valign="top">char </td>
262 <td class="mdname" nowrap> <em>modechar</em>, </td>
267 <td class="md" nowrap>int </td>
268 <td class="mdname" nowrap> <em>type</em></td>
272 <td class="md">) </td>
273 <td class="md" colspan="2"></td>
280 <table cellspacing=5 cellpadding=0 border=0>
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>.
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>.
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 < <a class="code" href="modules_8cpp.html#a2">EMode</a>.end(); i++)
297 00066 <span class="keywordflow">if</span> ((i->modechar == modechar) && (i->type == type))
299 00068 <span class="keywordflow">return</span> i->params_when_off;
302 00071 <span class="keywordflow">return</span> 0;
307 <a name="a5" doxytag="modules.cpp::ModeDefinedOn"></a><p>
308 <table width="100%" cellpadding="2" cellspacing="0" border="0">
311 <table cellpadding="0" cellspacing="0" border="0">
313 <td class="md" nowrap valign="top"> int ModeDefinedOn </td>
314 <td class="md" valign="top">( </td>
315 <td class="md" nowrap valign="top">char </td>
316 <td class="mdname" nowrap> <em>modechar</em>, </td>
321 <td class="md" nowrap>int </td>
322 <td class="mdname" nowrap> <em>type</em></td>
326 <td class="md">) </td>
327 <td class="md" colspan="2"></td>
334 <table cellspacing=5 cellpadding=0 border=0>
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>.
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>.
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 < <a class="code" href="modules_8cpp.html#a2">EMode</a>.end(); i++)
351 00053 <span class="keywordflow">if</span> ((i->modechar == modechar) && (i->type == type))
353 00055 <span class="keywordflow">return</span> i->params_when_on;
356 00058 <span class="keywordflow">return</span> 0;
361 <a name="a8" doxytag="modules.cpp::modules"></a><p>
362 <table width="100%" cellpadding="2" cellspacing="0" border="0">
365 <table cellpadding="0" cellspacing="0" border="0">
367 <td class="md" nowrap valign="top"> std::vector<<a class="el" href="classModule.html">Module</a>*> modules </td>
368 <td class="md" valign="top">( </td>
369 <td class="md" nowrap valign="top">255 </td>
370 <td class="mdname1" valign="top" nowrap> </td>
371 <td class="md" valign="top">) </td>
372 <td class="md" nowrap></td>
379 <table cellspacing=5 cellpadding=0 border=0>
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">
395 <table cellpadding="0" cellspacing="0" border="0">
397 <td class="md" nowrap valign="top"> <a class="el" href="modules_8cpp.html#a0">ExtModeList</a> EMode
402 <table cellspacing=5 cellpadding=0 border=0>
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>.
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>
417 <a name="a3" doxytag="modules.cpp::MODCOUNT"></a><p>
418 <table width="100%" cellpadding="2" cellspacing="0" border="0">
421 <table cellpadding="0" cellspacing="0" border="0">
423 <td class="md" nowrap valign="top"> int MODCOUNT = -1
428 <table cellspacing=5 cellpadding=0 border=0>
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>
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>