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>
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>bool </td><td valign=bottom><a class="el" href="modules_8cpp.html#a5">ModeDefinedOper</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">ModeDefinedOn</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#a7">ModeDefinedOff</a> (char modechar, int type)</td></tr>
37 <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>
38 <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>
39 <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>
40 <tr><td colspan=2><br><h2>Variables</h2></td></tr>
41 <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>
42 <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>
44 <hr><h2>Typedef Documentation</h2>
45 <a name="a0" doxytag="modules.cpp::ExtModeList"></a><p>
46 <table width="100%" cellpadding="2" cellspacing="0" border="0">
49 <table cellpadding="0" cellspacing="0" border="0">
51 <td class="md" nowrap valign="top"> typedef std::vector<<a class="el" href="classExtMode.html">ExtMode</a>> ExtModeList
56 <table cellspacing=5 cellpadding=0 border=0>
66 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>
69 <a name="a1" doxytag="modules.cpp::ExtModeListIter"></a><p>
70 <table width="100%" cellpadding="2" cellspacing="0" border="0">
73 <table cellpadding="0" cellspacing="0" border="0">
75 <td class="md" nowrap valign="top"> typedef ExtModeList::iterator ExtModeListIter
80 <table cellspacing=5 cellpadding=0 border=0>
90 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>.
92 Referenced by <a class="el" href="modules_8cpp-source.html#l00034">ModeDefined()</a>, <a class="el" href="modules_8cpp-source.html#l00076">ModeDefinedOff()</a>, <a class="el" href="modules_8cpp-source.html#l00063">ModeDefinedOn()</a>, and <a class="el" href="modules_8cpp-source.html#l00048">ModeDefinedOper()</a>. </td>
95 <hr><h2>Function Documentation</h2>
96 <a name="a8" doxytag="modules.cpp::DoAddExtendedMode"></a><p>
97 <table width="100%" cellpadding="2" cellspacing="0" border="0">
100 <table cellpadding="0" cellspacing="0" border="0">
102 <td class="md" nowrap valign="top"> bool DoAddExtendedMode </td>
103 <td class="md" valign="top">( </td>
104 <td class="md" nowrap valign="top">char </td>
105 <td class="mdname" nowrap> <em>modechar</em>, </td>
110 <td class="md" nowrap>int </td>
111 <td class="mdname" nowrap> <em>type</em>, </td>
116 <td class="md" nowrap>bool </td>
117 <td class="mdname" nowrap> <em>requires_oper</em>, </td>
122 <td class="md" nowrap>int </td>
123 <td class="mdname" nowrap> <em>params_on</em>, </td>
128 <td class="md" nowrap>int </td>
129 <td class="mdname" nowrap> <em>params_off</em></td>
133 <td class="md">) </td>
134 <td class="md" colspan="2"></td>
141 <table cellspacing=5 cellpadding=0 border=0>
151 Definition at line <a class="el" href="modules_8cpp-source.html#l00089">89</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
153 References <a class="el" href="modules_8cpp-source.html#l00031">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00034">ModeDefined()</a>.
155 Referenced by <a class="el" href="modules_8cpp-source.html#l00275">Server::AddExtendedMode()</a>.
157 <div class="fragment"><pre>00090 {
158 00091 <span class="keywordflow">if</span> (<a class="code" href="modules_8cpp.html#a4">ModeDefined</a>(modechar,type)) {
159 00092 <span class="keywordflow">return</span> <span class="keyword">false</span>;
161 00094 <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));
162 00095 <span class="keywordflow">return</span> <span class="keyword">true</span>;
167 <a name="a10" doxytag="modules.cpp::factory"></a><p>
168 <table width="100%" cellpadding="2" cellspacing="0" border="0">
171 <table cellpadding="0" cellspacing="0" border="0">
173 <td class="md" nowrap valign="top"> std::vector<<a class="el" href="modules_8h.html#a12">ircd_module</a>*> factory </td>
174 <td class="md" valign="top">( </td>
175 <td class="md" nowrap valign="top">255 </td>
176 <td class="mdname1" valign="top" nowrap> </td>
177 <td class="md" valign="top">) </td>
178 <td class="md" nowrap></td>
185 <table cellspacing=5 cellpadding=0 border=0>
196 <a name="a4" doxytag="modules.cpp::ModeDefined"></a><p>
197 <table width="100%" cellpadding="2" cellspacing="0" border="0">
200 <table cellpadding="0" cellspacing="0" border="0">
202 <td class="md" nowrap valign="top"> bool ModeDefined </td>
203 <td class="md" valign="top">( </td>
204 <td class="md" nowrap valign="top">char </td>
205 <td class="mdname" nowrap> <em>modechar</em>, </td>
210 <td class="md" nowrap>int </td>
211 <td class="mdname" nowrap> <em>type</em></td>
215 <td class="md">) </td>
216 <td class="md" colspan="2"></td>
223 <table cellspacing=5 cellpadding=0 border=0>
233 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>.
235 References <a class="el" href="modules_8cpp-source.html#l00031">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00029">ExtModeListIter</a>.
237 Referenced by <a class="el" href="modules_8cpp-source.html#l00089">DoAddExtendedMode()</a>.
239 <div class="fragment"><pre>00035 {
240 00036 log(DEBUG,<span class="stringliteral">"Size of extmodes vector is %d"</span>,<a class="code" href="modules_8cpp.html#a2">EMode</a>.size());
241 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++)
243 00039 log(DEBUG,<span class="stringliteral">"i->modechar==%c, modechar=%c, i->type=%d, type=%d"</span>,i->modechar,modechar,i->type,type);
244 00040 <span class="keywordflow">if</span> ((i->modechar == modechar) && (i->type == type))
246 00042 <span class="keywordflow">return</span> <span class="keyword">true</span>;
249 00045 <span class="keywordflow">return</span> <span class="keyword">false</span>;
254 <a name="a7" doxytag="modules.cpp::ModeDefinedOff"></a><p>
255 <table width="100%" cellpadding="2" cellspacing="0" border="0">
258 <table cellpadding="0" cellspacing="0" border="0">
260 <td class="md" nowrap valign="top"> int ModeDefinedOff </td>
261 <td class="md" valign="top">( </td>
262 <td class="md" nowrap valign="top">char </td>
263 <td class="mdname" nowrap> <em>modechar</em>, </td>
268 <td class="md" nowrap>int </td>
269 <td class="mdname" nowrap> <em>type</em></td>
273 <td class="md">) </td>
274 <td class="md" colspan="2"></td>
281 <table cellspacing=5 cellpadding=0 border=0>
291 Definition at line <a class="el" href="modules_8cpp-source.html#l00076">76</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
293 References <a class="el" href="modules_8cpp-source.html#l00031">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00029">ExtModeListIter</a>.
295 <div class="fragment"><pre>00077 {
296 00078 <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++)
298 00080 <span class="keywordflow">if</span> ((i->modechar == modechar) && (i->type == type))
300 00082 <span class="keywordflow">return</span> i->params_when_off;
303 00085 <span class="keywordflow">return</span> 0;
308 <a name="a6" doxytag="modules.cpp::ModeDefinedOn"></a><p>
309 <table width="100%" cellpadding="2" cellspacing="0" border="0">
312 <table cellpadding="0" cellspacing="0" border="0">
314 <td class="md" nowrap valign="top"> int ModeDefinedOn </td>
315 <td class="md" valign="top">( </td>
316 <td class="md" nowrap valign="top">char </td>
317 <td class="mdname" nowrap> <em>modechar</em>, </td>
322 <td class="md" nowrap>int </td>
323 <td class="mdname" nowrap> <em>type</em></td>
327 <td class="md">) </td>
328 <td class="md" colspan="2"></td>
335 <table cellspacing=5 cellpadding=0 border=0>
345 Definition at line <a class="el" href="modules_8cpp-source.html#l00063">63</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
347 References <a class="el" href="modules_8cpp-source.html#l00031">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00029">ExtModeListIter</a>.
349 <div class="fragment"><pre>00064 {
350 00065 <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++)
352 00067 <span class="keywordflow">if</span> ((i->modechar == modechar) && (i->type == type))
354 00069 <span class="keywordflow">return</span> i->params_when_on;
357 00072 <span class="keywordflow">return</span> 0;
362 <a name="a5" doxytag="modules.cpp::ModeDefinedOper"></a><p>
363 <table width="100%" cellpadding="2" cellspacing="0" border="0">
366 <table cellpadding="0" cellspacing="0" border="0">
368 <td class="md" nowrap valign="top"> bool ModeDefinedOper </td>
369 <td class="md" valign="top">( </td>
370 <td class="md" nowrap valign="top">char </td>
371 <td class="mdname" nowrap> <em>modechar</em>, </td>
376 <td class="md" nowrap>int </td>
377 <td class="mdname" nowrap> <em>type</em></td>
381 <td class="md">) </td>
382 <td class="md" colspan="2"></td>
389 <table cellspacing=5 cellpadding=0 border=0>
399 Definition at line <a class="el" href="modules_8cpp-source.html#l00048">48</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
401 References <a class="el" href="modules_8cpp-source.html#l00031">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00029">ExtModeListIter</a>.
403 <div class="fragment"><pre>00049 {
404 00050 log(DEBUG,<span class="stringliteral">"Size of extmodes vector is %d"</span>,<a class="code" href="modules_8cpp.html#a2">EMode</a>.size());
405 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++)
407 00053 log(DEBUG,<span class="stringliteral">"i->modechar==%c, modechar=%c, i->type=%d, type=%d"</span>,i->modechar,modechar,i->type,type);
408 00054 <span class="keywordflow">if</span> ((i->modechar == modechar) && (i->type == type) && (i->needsoper == <span class="keyword">true</span>))
410 00056 <span class="keywordflow">return</span> <span class="keyword">true</span>;
413 00059 <span class="keywordflow">return</span> <span class="keyword">false</span>;
418 <a name="a9" doxytag="modules.cpp::modules"></a><p>
419 <table width="100%" cellpadding="2" cellspacing="0" border="0">
422 <table cellpadding="0" cellspacing="0" border="0">
424 <td class="md" nowrap valign="top"> std::vector<<a class="el" href="classModule.html">Module</a>*> modules </td>
425 <td class="md" valign="top">( </td>
426 <td class="md" nowrap valign="top">255 </td>
427 <td class="mdname1" valign="top" nowrap> </td>
428 <td class="md" valign="top">) </td>
429 <td class="md" nowrap></td>
436 <table cellspacing=5 cellpadding=0 border=0>
447 <hr><h2>Variable Documentation</h2>
448 <a name="a2" doxytag="modules.cpp::EMode"></a><p>
449 <table width="100%" cellpadding="2" cellspacing="0" border="0">
452 <table cellpadding="0" cellspacing="0" border="0">
454 <td class="md" nowrap valign="top"> <a class="el" href="modules_8cpp.html#a0">ExtModeList</a> EMode
459 <table cellspacing=5 cellpadding=0 border=0>
469 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>.
471 Referenced by <a class="el" href="modules_8cpp-source.html#l00089">DoAddExtendedMode()</a>, <a class="el" href="modules_8cpp-source.html#l00034">ModeDefined()</a>, <a class="el" href="modules_8cpp-source.html#l00076">ModeDefinedOff()</a>, <a class="el" href="modules_8cpp-source.html#l00063">ModeDefinedOn()</a>, and <a class="el" href="modules_8cpp-source.html#l00048">ModeDefinedOper()</a>. </td>
474 <a name="a3" doxytag="modules.cpp::MODCOUNT"></a><p>
475 <table width="100%" cellpadding="2" cellspacing="0" border="0">
478 <table cellpadding="0" cellspacing="0" border="0">
480 <td class="md" nowrap valign="top"> int MODCOUNT = -1
485 <table cellspacing=5 cellpadding=0 border=0>
495 Definition at line <a class="el" href="modules_8cpp-source.html#l00380">380</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. </td>
498 <hr><address style="align: right;"><small>Generated on Tue Apr 6 21:13:31 2004 for InspIRCd by
499 <a href="http://www.doxygen.org/index.html">
500 <img src="doxygen.png" alt="doxygen" align="middle" border=0
501 width=110 height=53></a>1.3-rc3 </small></address>