<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>modules.cpp File Reference</title>
<link href="inspircd.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3-rc3 -->
<center>
<a class="qindex" href="main.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center>
<hr><h1>modules.cpp File Reference</h1><code>#include &lt;typeinfo&gt;</code><br>
<code>#include &lt;iostream&gt;</code><br>
<code>#include "globals.h"</code><br>
<code>#include "<a class="el" href="modules_8h-source.html">modules.h</a>"</code><br>
<code>#include "<a class="el" href="ctables_8h-source.html">ctables.h</a>"</code><br>
<code>#include "inspircd_io.h"</code><br>
<code>#include "wildcard.h"</code><br>

<p>
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>
<map name="modules.cpp_map">
<area href="modules_8h.html" shape="rect" coords="255,224,321,245" alt="">
<area href="base_8h.html" shape="rect" coords="304,85,352,107" alt="">
<area href="ctables_8h.html" shape="rect" coords="415,155,476,176" alt="">
</map>

<p>
<a href="modules_8cpp-source.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Compounds</h2></td></tr>
<tr><td nowrap align=right valign=top>class &nbsp;</td><td valign=bottom><a class="el" href="classExtMode.html">ExtMode</a></td></tr>
<tr><td colspan=2><br><h2>Typedefs</h2></td></tr>
<tr><td nowrap align=right valign=top>typedef std::vector&lt; <a class="el" href="classExtMode.html">ExtMode</a> &gt;&nbsp;</td><td valign=bottom><a class="el" href="modules_8cpp.html#a0">ExtModeList</a></td></tr>
<tr><td nowrap align=right valign=top>typedef ExtModeList::iterator&nbsp;</td><td valign=bottom><a class="el" href="modules_8cpp.html#a1">ExtModeListIter</a></td></tr>
<tr><td colspan=2><br><h2>Functions</h2></td></tr>
<tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="modules_8cpp.html#a4">ModeDefined</a> (char modechar, int type)</td></tr>
<tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="modules_8cpp.html#a5">ModeDefinedOper</a> (char modechar, int type)</td></tr>
<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="modules_8cpp.html#a6">ModeDefinedOn</a> (char modechar, int type)</td></tr>
<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="modules_8cpp.html#a7">ModeDefinedOff</a> (char modechar, int type)</td></tr>
<tr><td nowrap align=right valign=top>bool&nbsp;</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>
<tr><td nowrap align=right valign=top>std::vector&lt; <a class="el" href="classModule.html">Module</a> * &gt;&nbsp;</td><td valign=bottom><a class="el" href="modules_8cpp.html#a9">modules</a> (255)</td></tr>
<tr><td nowrap align=right valign=top>std::vector&lt; <a class="el" href="modules_8h.html#a12">ircd_module</a> * &gt;&nbsp;</td><td valign=bottom><a class="el" href="modules_8cpp.html#a10">factory</a> (255)</td></tr>
<tr><td colspan=2><br><h2>Variables</h2></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="modules_8cpp.html#a0">ExtModeList</a>&nbsp;</td><td valign=bottom><a class="el" href="modules_8cpp.html#a2">EMode</a></td></tr>
<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="modules_8cpp.html#a3">MODCOUNT</a> = -1</td></tr>
</table>
<hr><h2>Typedef Documentation</h2>
<a name="a0" doxytag="modules.cpp::ExtModeList"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> typedef std::vector&lt;<a class="el" href="classExtMode.html">ExtMode</a>&gt; ExtModeList
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
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>
  </tr>
</table>
<a name="a1" doxytag="modules.cpp::ExtModeListIter"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> typedef ExtModeList::iterator ExtModeListIter
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
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>.
<p>
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>
  </tr>
</table>
<hr><h2>Function Documentation</h2>
<a name="a8" doxytag="modules.cpp::DoAddExtendedMode"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> bool DoAddExtendedMode </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">char&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>modechar</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>type</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>requires_oper</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>params_on</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>params_off</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
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>.
<p>
References <a class="el" href="modules_8cpp-source.html#l00032">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00035">ModeDefined()</a>.
<p>
Referenced by <a class="el" href="modules_8cpp-source.html#l00308">Server::AddExtendedMode()</a>.
<p>
<div class="fragment"><pre>00091 {
00092         <span class="keywordflow">if</span> (<a class="code" href="modules_8cpp.html#a4">ModeDefined</a>(modechar,type)) {
00093                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
00094         }
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));
00096         <span class="keywordflow">return</span> <span class="keyword">true</span>;
00097 }
</pre></div>    </td>
  </tr>
</table>
<a name="a10" doxytag="modules.cpp::factory"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="modules_8h.html#a12">ircd_module</a>*&gt; factory </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">255&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a name="a4" doxytag="modules.cpp::ModeDefined"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> bool ModeDefined </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">char&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>modechar</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>type</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
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>.
<p>
References <a class="el" href="modules_8cpp-source.html#l00032">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00030">ExtModeListIter</a>.
<p>
Referenced by <a class="el" href="modules_8cpp-source.html#l00090">DoAddExtendedMode()</a>.
<p>
<div class="fragment"><pre>00036 {
00037         log(DEBUG,<span class="stringliteral">"Size of extmodes vector is %d"</span>,<a class="code" href="modules_8cpp.html#a2">EMode</a>.size());
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 &lt; <a class="code" href="modules_8cpp.html#a2">EMode</a>.end(); i++)
00039         {
00040                 log(DEBUG,<span class="stringliteral">"i-&gt;modechar==%c, modechar=%c, i-&gt;type=%d, type=%d"</span>,i-&gt;modechar,modechar,i-&gt;type,type);
00041                 <span class="keywordflow">if</span> ((i-&gt;modechar == modechar) &amp;&amp; (i-&gt;type == type))
00042                 {
00043                         <span class="keywordflow">return</span> <span class="keyword">true</span>;
00044                 }
00045         }
00046         <span class="keywordflow">return</span> <span class="keyword">false</span>;
00047 }
</pre></div>    </td>
  </tr>
</table>
<a name="a7" doxytag="modules.cpp::ModeDefinedOff"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int ModeDefinedOff </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">char&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>modechar</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>type</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
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>.
<p>
References <a class="el" href="modules_8cpp-source.html#l00032">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00030">ExtModeListIter</a>.
<p>
<div class="fragment"><pre>00078 {
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 &lt; <a class="code" href="modules_8cpp.html#a2">EMode</a>.end(); i++)
00080         {
00081                 <span class="keywordflow">if</span> ((i-&gt;modechar == modechar) &amp;&amp; (i-&gt;type == type))
00082                 {
00083                         <span class="keywordflow">return</span> i-&gt;params_when_off;
00084                 }
00085         }
00086         <span class="keywordflow">return</span> 0;
00087 }
</pre></div>    </td>
  </tr>
</table>
<a name="a6" doxytag="modules.cpp::ModeDefinedOn"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int ModeDefinedOn </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">char&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>modechar</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>type</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
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>.
<p>
References <a class="el" href="modules_8cpp-source.html#l00032">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00030">ExtModeListIter</a>.
<p>
<div class="fragment"><pre>00065 {
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 &lt; <a class="code" href="modules_8cpp.html#a2">EMode</a>.end(); i++)
00067         {
00068                 <span class="keywordflow">if</span> ((i-&gt;modechar == modechar) &amp;&amp; (i-&gt;type == type))
00069                 {
00070                         <span class="keywordflow">return</span> i-&gt;params_when_on;
00071                 }
00072         }
00073         <span class="keywordflow">return</span> 0;
00074 }
</pre></div>    </td>
  </tr>
</table>
<a name="a5" doxytag="modules.cpp::ModeDefinedOper"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> bool ModeDefinedOper </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">char&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>modechar</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>type</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
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>.
<p>
References <a class="el" href="modules_8cpp-source.html#l00032">EMode</a>, and <a class="el" href="modules_8cpp-source.html#l00030">ExtModeListIter</a>.
<p>
<div class="fragment"><pre>00050 {
00051         log(DEBUG,<span class="stringliteral">"Size of extmodes vector is %d"</span>,<a class="code" href="modules_8cpp.html#a2">EMode</a>.size());
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 &lt; <a class="code" href="modules_8cpp.html#a2">EMode</a>.end(); i++)
00053         {
00054                 log(DEBUG,<span class="stringliteral">"i-&gt;modechar==%c, modechar=%c, i-&gt;type=%d, type=%d"</span>,i-&gt;modechar,modechar,i-&gt;type,type);
00055                 <span class="keywordflow">if</span> ((i-&gt;modechar == modechar) &amp;&amp; (i-&gt;type == type) &amp;&amp; (i-&gt;needsoper == <span class="keyword">true</span>))
00056                 {
00057                         <span class="keywordflow">return</span> <span class="keyword">true</span>;
00058                 }
00059         }
00060         <span class="keywordflow">return</span> <span class="keyword">false</span>;
00061 }
</pre></div>    </td>
  </tr>
</table>
<a name="a9" doxytag="modules.cpp::modules"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classModule.html">Module</a>*&gt; modules </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">255&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<hr><h2>Variable Documentation</h2>
<a name="a2" doxytag="modules.cpp::EMode"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="modules_8cpp.html#a0">ExtModeList</a> EMode
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
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>.
<p>
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>
  </tr>
</table>
<a name="a3" doxytag="modules.cpp::MODCOUNT"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int MODCOUNT = -1
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="modules_8cpp-source.html#l00429">429</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.    </td>
  </tr>
</table>
<hr><address style="align: right;"><small>Generated on Sat Apr 17 13:33:47 2004 for InspIRCd by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 
width=110 height=53></a>1.3-rc3 </small></address>
</body>
</html>