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">ModeIsListMode</a> (char modechar, int type)</td></tr>
41 <tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="modules_8cpp.html#a6">ModeDefinedOper</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">ModeDefinedOn</a> (char modechar, int type)</td></tr>
43 <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="modules_8cpp.html#a8">ModeDefinedOff</a> (char modechar, int type)</td></tr>
44 <tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="modules_8cpp.html#a9">DoAddExtendedMode</a> (char modechar, int type, bool requires_oper, int params_on, int params_off)</td></tr>
45 <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="modules_8cpp.html#a10">ModeMakeList</a> (char modechar)</td></tr>
46 <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#a11">modules</a> (255)</td></tr>
47 <tr><td nowrap align=right valign=top>std::vector< <a class="el" href="modules_8h.html#a24">ircd_module</a> * > </td><td valign=bottom><a class="el" href="modules_8cpp.html#a12">factory</a> (255)</td></tr>
48 <tr><td colspan=2><br><h2>Variables</h2></td></tr>
49 <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>
50 <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>
52 <hr><h2>Typedef Documentation</h2>
53 <a name="a0" doxytag="modules.cpp::ExtModeList"></a><p>
54 <table width="100%" cellpadding="2" cellspacing="0" border="0">
57 <table cellpadding="0" cellspacing="0" border="0">
59 <td class="md" nowrap valign="top"> typedef std::vector<<a class="el" href="classExtMode.html">ExtMode</a>> ExtModeList
64 <table cellspacing=5 cellpadding=0 border=0>
74 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>. </td>
77 <a name="a1" doxytag="modules.cpp::ExtModeListIter"></a><p>
78 <table width="100%" cellpadding="2" cellspacing="0" border="0">
81 <table cellpadding="0" cellspacing="0" border="0">
83 <td class="md" nowrap valign="top"> typedef ExtModeList::iterator ExtModeListIter
88 <table cellspacing=5 cellpadding=0 border=0>
98 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>.
100 Referenced by <a class="el" href="modules_8cpp-source.html#l00039">ModeDefined()</a>, <a class="el" href="modules_8cpp-source.html#l00095">ModeDefinedOff()</a>, <a class="el" href="modules_8cpp-source.html#l00082">ModeDefinedOn()</a>, <a class="el" href="modules_8cpp-source.html#l00067">ModeDefinedOper()</a>, <a class="el" href="modules_8cpp-source.html#l00053">ModeIsListMode()</a>, and <a class="el" href="modules_8cpp-source.html#l00118">ModeMakeList()</a>. </td>
103 <hr><h2>Function Documentation</h2>
104 <a name="a9" doxytag="modules.cpp::DoAddExtendedMode"></a><p>
105 <table width="100%" cellpadding="2" cellspacing="0" border="0">
108 <table cellpadding="0" cellspacing="0" border="0">
110 <td class="md" nowrap valign="top"> bool DoAddExtendedMode </td>
111 <td class="md" valign="top">( </td>
112 <td class="md" nowrap valign="top">char </td>
113 <td class="mdname" nowrap> <em>modechar</em>, </td>
118 <td class="md" nowrap>int </td>
119 <td class="mdname" nowrap> <em>type</em>, </td>
124 <td class="md" nowrap>bool </td>
125 <td class="mdname" nowrap> <em>requires_oper</em>, </td>
130 <td class="md" nowrap>int </td>
131 <td class="mdname" nowrap> <em>params_on</em>, </td>
136 <td class="md" nowrap>int </td>
137 <td class="mdname" nowrap> <em>params_off</em></td>
141 <td class="md">) </td>
142 <td class="md" colspan="2"></td>
149 <table cellspacing=5 cellpadding=0 border=0>
159 Definition at line <a class="el" href="modules_8cpp-source.html#l00108">108</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
161 References <a class="el" href="modules_8cpp-source.html#l00036">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00039">ModeDefined()</a>.
163 Referenced by <a class="el" href="modules_8cpp-source.html#l00371">Server::AddExtendedListMode()</a>, and <a class="el" href="modules_8cpp-source.html#l00351">Server::AddExtendedMode()</a>.
165 <div class="fragment"><pre>00109 {
166 00110 <span class="keywordflow">if</span> (<a class="code" href="modules_8cpp.html#a4">ModeDefined</a>(modechar,type)) {
167 00111 <span class="keywordflow">return</span> <span class="keyword">false</span>;
169 00113 <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));
170 00114 <span class="keywordflow">return</span> <span class="keyword">true</span>;
175 <a name="a12" doxytag="modules.cpp::factory"></a><p>
176 <table width="100%" cellpadding="2" cellspacing="0" border="0">
179 <table cellpadding="0" cellspacing="0" border="0">
181 <td class="md" nowrap valign="top"> std::vector<<a class="el" href="modules_8h.html#a24">ircd_module</a>*> factory </td>
182 <td class="md" valign="top">( </td>
183 <td class="md" nowrap valign="top">255 </td>
184 <td class="mdname1" valign="top" nowrap> </td>
185 <td class="md" valign="top">) </td>
186 <td class="md" nowrap></td>
193 <table cellspacing=5 cellpadding=0 border=0>
204 <a name="a4" doxytag="modules.cpp::ModeDefined"></a><p>
205 <table width="100%" cellpadding="2" cellspacing="0" border="0">
208 <table cellpadding="0" cellspacing="0" border="0">
210 <td class="md" nowrap valign="top"> bool ModeDefined </td>
211 <td class="md" valign="top">( </td>
212 <td class="md" nowrap valign="top">char </td>
213 <td class="mdname" nowrap> <em>modechar</em>, </td>
218 <td class="md" nowrap>int </td>
219 <td class="mdname" nowrap> <em>type</em></td>
223 <td class="md">) </td>
224 <td class="md" colspan="2"></td>
231 <table cellspacing=5 cellpadding=0 border=0>
241 Definition at line <a class="el" href="modules_8cpp-source.html#l00039">39</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
243 References <a class="el" href="modules_8cpp-source.html#l00036">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00034">ExtModeListIter</a>.
245 Referenced by <a class="el" href="modules_8cpp-source.html#l00108">DoAddExtendedMode()</a>.
247 <div class="fragment"><pre>00040 {
248 00041 log(DEBUG,<span class="stringliteral">"Size of extmodes vector is %d"</span>,<a class="code" href="modules_8cpp.html#a2">EMode</a>.size());
249 00042 <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++)
251 00044 log(DEBUG,<span class="stringliteral">"i->modechar==%c, modechar=%c, i->type=%d, type=%d"</span>,i->modechar,modechar,i->type,type);
252 00045 <span class="keywordflow">if</span> ((i->modechar == modechar) && (i->type == type))
254 00047 <span class="keywordflow">return</span> <span class="keyword">true</span>;
257 00050 <span class="keywordflow">return</span> <span class="keyword">false</span>;
262 <a name="a8" doxytag="modules.cpp::ModeDefinedOff"></a><p>
263 <table width="100%" cellpadding="2" cellspacing="0" border="0">
266 <table cellpadding="0" cellspacing="0" border="0">
268 <td class="md" nowrap valign="top"> int ModeDefinedOff </td>
269 <td class="md" valign="top">( </td>
270 <td class="md" nowrap valign="top">char </td>
271 <td class="mdname" nowrap> <em>modechar</em>, </td>
276 <td class="md" nowrap>int </td>
277 <td class="mdname" nowrap> <em>type</em></td>
281 <td class="md">) </td>
282 <td class="md" colspan="2"></td>
289 <table cellspacing=5 cellpadding=0 border=0>
299 Definition at line <a class="el" href="modules_8cpp-source.html#l00095">95</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
301 References <a class="el" href="modules_8cpp-source.html#l00036">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00034">ExtModeListIter</a>.
303 <div class="fragment"><pre>00096 {
304 00097 <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++)
306 00099 <span class="keywordflow">if</span> ((i->modechar == modechar) && (i->type == type))
308 00101 <span class="keywordflow">return</span> i->params_when_off;
311 00104 <span class="keywordflow">return</span> 0;
316 <a name="a7" doxytag="modules.cpp::ModeDefinedOn"></a><p>
317 <table width="100%" cellpadding="2" cellspacing="0" border="0">
320 <table cellpadding="0" cellspacing="0" border="0">
322 <td class="md" nowrap valign="top"> int ModeDefinedOn </td>
323 <td class="md" valign="top">( </td>
324 <td class="md" nowrap valign="top">char </td>
325 <td class="mdname" nowrap> <em>modechar</em>, </td>
330 <td class="md" nowrap>int </td>
331 <td class="mdname" nowrap> <em>type</em></td>
335 <td class="md">) </td>
336 <td class="md" colspan="2"></td>
343 <table cellspacing=5 cellpadding=0 border=0>
353 Definition at line <a class="el" href="modules_8cpp-source.html#l00082">82</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
355 References <a class="el" href="modules_8cpp-source.html#l00036">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00034">ExtModeListIter</a>.
357 <div class="fragment"><pre>00083 {
358 00084 <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++)
360 00086 <span class="keywordflow">if</span> ((i->modechar == modechar) && (i->type == type))
362 00088 <span class="keywordflow">return</span> i->params_when_on;
365 00091 <span class="keywordflow">return</span> 0;
370 <a name="a6" doxytag="modules.cpp::ModeDefinedOper"></a><p>
371 <table width="100%" cellpadding="2" cellspacing="0" border="0">
374 <table cellpadding="0" cellspacing="0" border="0">
376 <td class="md" nowrap valign="top"> bool ModeDefinedOper </td>
377 <td class="md" valign="top">( </td>
378 <td class="md" nowrap valign="top">char </td>
379 <td class="mdname" nowrap> <em>modechar</em>, </td>
384 <td class="md" nowrap>int </td>
385 <td class="mdname" nowrap> <em>type</em></td>
389 <td class="md">) </td>
390 <td class="md" colspan="2"></td>
397 <table cellspacing=5 cellpadding=0 border=0>
407 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>.
409 References <a class="el" href="modules_8cpp-source.html#l00036">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00034">ExtModeListIter</a>.
411 <div class="fragment"><pre>00068 {
412 00069 log(DEBUG,<span class="stringliteral">"Size of extmodes vector is %d"</span>,<a class="code" href="modules_8cpp.html#a2">EMode</a>.size());
413 00070 <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++)
415 00072 log(DEBUG,<span class="stringliteral">"i->modechar==%c, modechar=%c, i->type=%d, type=%d"</span>,i->modechar,modechar,i->type,type);
416 00073 <span class="keywordflow">if</span> ((i->modechar == modechar) && (i->type == type) && (i->needsoper == <span class="keyword">true</span>))
418 00075 <span class="keywordflow">return</span> <span class="keyword">true</span>;
421 00078 <span class="keywordflow">return</span> <span class="keyword">false</span>;
426 <a name="a5" doxytag="modules.cpp::ModeIsListMode"></a><p>
427 <table width="100%" cellpadding="2" cellspacing="0" border="0">
430 <table cellpadding="0" cellspacing="0" border="0">
432 <td class="md" nowrap valign="top"> bool ModeIsListMode </td>
433 <td class="md" valign="top">( </td>
434 <td class="md" nowrap valign="top">char </td>
435 <td class="mdname" nowrap> <em>modechar</em>, </td>
440 <td class="md" nowrap>int </td>
441 <td class="mdname" nowrap> <em>type</em></td>
445 <td class="md">) </td>
446 <td class="md" colspan="2"></td>
453 <table cellspacing=5 cellpadding=0 border=0>
463 Definition at line <a class="el" href="modules_8cpp-source.html#l00053">53</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
465 References <a class="el" href="modules_8cpp-source.html#l00036">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00034">ExtModeListIter</a>.
467 <div class="fragment"><pre>00054 {
468 00055 log(DEBUG,<span class="stringliteral">"Size of extmodes vector is %d"</span>,<a class="code" href="modules_8cpp.html#a2">EMode</a>.size());
469 00056 <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++)
471 00058 log(DEBUG,<span class="stringliteral">"i->modechar==%c, modechar=%c, i->type=%d, type=%d"</span>,i->modechar,modechar,i->type,type);
472 00059 <span class="keywordflow">if</span> ((i->modechar == modechar) && (i->type == type) && (i->list == <span class="keyword">true</span>))
474 00061 <span class="keywordflow">return</span> <span class="keyword">true</span>;
477 00064 <span class="keywordflow">return</span> <span class="keyword">false</span>;
482 <a name="a10" doxytag="modules.cpp::ModeMakeList"></a><p>
483 <table width="100%" cellpadding="2" cellspacing="0" border="0">
486 <table cellpadding="0" cellspacing="0" border="0">
488 <td class="md" nowrap valign="top"> void ModeMakeList </td>
489 <td class="md" valign="top">( </td>
490 <td class="md" nowrap valign="top">char </td>
491 <td class="mdname1" valign="top" nowrap> <em>modechar</em> </td>
492 <td class="md" valign="top">) </td>
493 <td class="md" nowrap></td>
500 <table cellspacing=5 cellpadding=0 border=0>
510 Definition at line <a class="el" href="modules_8cpp-source.html#l00118">118</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
512 References <a class="el" href="modules_8cpp-source.html#l00036">EMode</a>, <a class="el" href="modules_8cpp-source.html#l00034">ExtModeListIter</a>, and <a class="el" href="modules_8h-source.html#l00021">MT_CHANNEL</a>.
514 Referenced by <a class="el" href="modules_8cpp-source.html#l00371">Server::AddExtendedListMode()</a>.
516 <div class="fragment"><pre>00119 {
517 00120 <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++)
519 00122 <span class="keywordflow">if</span> ((i->modechar == modechar) && (i->type == <a class="code" href="modules_8h.html#a5">MT_CHANNEL</a>))
521 00124 i->list = <span class="keyword">true</span>;
522 00125 <span class="keywordflow">return</span>;
525 00128 <span class="keywordflow">return</span>;
530 <a name="a11" doxytag="modules.cpp::modules"></a><p>
531 <table width="100%" cellpadding="2" cellspacing="0" border="0">
534 <table cellpadding="0" cellspacing="0" border="0">
536 <td class="md" nowrap valign="top"> std::vector<<a class="el" href="classModule.html">Module</a>*> modules </td>
537 <td class="md" valign="top">( </td>
538 <td class="md" nowrap valign="top">255 </td>
539 <td class="mdname1" valign="top" nowrap> </td>
540 <td class="md" valign="top">) </td>
541 <td class="md" nowrap></td>
548 <table cellspacing=5 cellpadding=0 border=0>
559 <hr><h2>Variable Documentation</h2>
560 <a name="a2" doxytag="modules.cpp::EMode"></a><p>
561 <table width="100%" cellpadding="2" cellspacing="0" border="0">
564 <table cellpadding="0" cellspacing="0" border="0">
566 <td class="md" nowrap valign="top"> <a class="el" href="modules_8cpp.html#a0">ExtModeList</a> EMode
571 <table cellspacing=5 cellpadding=0 border=0>
581 Definition at line <a class="el" href="modules_8cpp-source.html#l00036">36</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
583 Referenced by <a class="el" href="modules_8cpp-source.html#l00108">DoAddExtendedMode()</a>, <a class="el" href="modules_8cpp-source.html#l00039">ModeDefined()</a>, <a class="el" href="modules_8cpp-source.html#l00095">ModeDefinedOff()</a>, <a class="el" href="modules_8cpp-source.html#l00082">ModeDefinedOn()</a>, <a class="el" href="modules_8cpp-source.html#l00067">ModeDefinedOper()</a>, <a class="el" href="modules_8cpp-source.html#l00053">ModeIsListMode()</a>, and <a class="el" href="modules_8cpp-source.html#l00118">ModeMakeList()</a>. </td>
586 <a name="a3" doxytag="modules.cpp::MODCOUNT"></a><p>
587 <table width="100%" cellpadding="2" cellspacing="0" border="0">
590 <table cellpadding="0" cellspacing="0" border="0">
592 <td class="md" nowrap valign="top"> int MODCOUNT = -1
597 <table cellspacing=5 cellpadding=0 border=0>
607 Definition at line <a class="el" href="modules_8cpp-source.html#l00484">484</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. </td>
610 <hr><address style="align: right;"><small>Generated on Sat May 1 13:39:06 2004 for InspIRCd by
611 <a href="http://www.doxygen.org/index.html">
612 <img src="doxygen.png" alt="doxygen" align="middle" border=0
613 width=110 height=53></a>1.3-rc3 </small></address>