]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/classModule.html
Added more documentation
[user/henk/code/inspircd.git] / docs / module-doc / classModule.html
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>Module class Reference</title>
4 <link href="inspircd.css" rel="stylesheet" type="text/css">
5 </head><body>
6 <!-- Generated by Doxygen 1.3-rc3 -->
7 <center>
8 <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>
9 <hr><h1>Module Class Reference</h1>Base class for all InspIRCd modules This class is the base class for InspIRCd modules. 
10 <a href="#_details">More...</a>
11 <p>
12 <code>#include &lt;<a class="el" href="modules_8h-source.html">modules.h</a>&gt;</code>
13 <p>
14 Inheritance diagram for Module:<p><center><img src="classModule__inherit__graph.gif" border="0" usemap="#Module__inherit__map" alt="Inheritance graph"></center>
15 <map name="Module__inherit__map">
16 <area href="classclassbase.html" shape="rect" coords="7,16,73,37" alt="">
17 </map>
18 <center><font size="2">[<a target="top" href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for Module:<p><center><img src="classModule__coll__graph.gif" border="0" usemap="#Module__coll__map" alt="Collaboration graph"></center>
19 <map name="Module__coll__map">
20 <area href="classclassbase.html" shape="rect" coords="7,106,73,128" alt="">
21 </map>
22 <center><font size="2">[<a target="top" href="graph_legend.html">legend</a>]</font></center><a href="classModule-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
23 <tr><td></td></tr>
24 <tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
25 <tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classModule.html#a0">Module</a> ()</td></tr>
26 <tr><td>&nbsp;</td><td><font size=-1><em>Default constructor creates a module class.</em> <a href="#a0"></a><em></em></font><br><br></td></tr>
27 <tr><td nowrap align=right valign=top>virtual&nbsp;</td><td valign=bottom><a class="el" href="classModule.html#a1">~Module</a> ()</td></tr>
28 <tr><td>&nbsp;</td><td><font size=-1><em>Default destructor destroys a module class.</em> <a href="#a1"></a><em></em></font><br><br></td></tr>
29 <tr><td nowrap align=right valign=top>virtual <a class="el" href="classVersion.html">Version</a>&nbsp;</td><td valign=bottom><a class="el" href="classModule.html#a2">GetVersion</a> ()</td></tr>
30 <tr><td>&nbsp;</td><td><font size=-1><em>Returns the version number of a Module.</em> <a href="#a2"></a><em></em></font><br><br></td></tr>
31 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classModule.html#a3">OnUserConnect</a> (<a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
32 <tr><td>&nbsp;</td><td><font size=-1><em>Called when a user connects.</em> <a href="#a3"></a><em></em></font><br><br></td></tr>
33 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classModule.html#a4">OnUserQuit</a> (<a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
34 <tr><td>&nbsp;</td><td><font size=-1><em>Called when a user quits.</em> <a href="#a4"></a><em></em></font><br><br></td></tr>
35 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classModule.html#a5">OnUserJoin</a> (<a class="el" href="classuserrec.html">userrec</a> *user, <a class="el" href="classchanrec.html">chanrec</a> *channel)</td></tr>
36 <tr><td>&nbsp;</td><td><font size=-1><em>Called when a user joins a channel.</em> <a href="#a5"></a><em></em></font><br><br></td></tr>
37 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classModule.html#a6">OnUserPart</a> (<a class="el" href="classuserrec.html">userrec</a> *user, <a class="el" href="classchanrec.html">chanrec</a> *channel)</td></tr>
38 <tr><td>&nbsp;</td><td><font size=-1><em>Called when a user parts a channel.</em> <a href="#a6"></a><em></em></font><br><br></td></tr>
39 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classModule.html#a7">OnPacketTransmit</a> (char *p)</td></tr>
40 <tr><td>&nbsp;</td><td><font size=-1><em>Called before a packet is transmitted across the irc network between two irc servers.</em> <a href="#a7"></a><em></em></font><br><br></td></tr>
41 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classModule.html#a8">OnPacketReceive</a> (char *p)</td></tr>
42 <tr><td>&nbsp;</td><td><font size=-1><em>Called after a packet is received from another irc server.</em> <a href="#a8"></a><em></em></font><br><br></td></tr>
43 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classModule.html#a9">OnRehash</a> ()</td></tr>
44 <tr><td>&nbsp;</td><td><font size=-1><em>Called on rehash.</em> <a href="#a9"></a><em></em></font><br><br></td></tr>
45 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classModule.html#a10">OnServerRaw</a> (std::string &amp;raw, bool inbound, <a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
46 <tr><td>&nbsp;</td><td><font size=-1><em>Called when a raw command is transmitted or received.</em> <a href="#a10"></a><em></em></font><br><br></td></tr>
47 <tr><td nowrap align=right valign=top>virtual bool&nbsp;</td><td valign=bottom><a class="el" href="classModule.html#a11">OnExtendedMode</a> (<a class="el" href="classuserrec.html">userrec</a> *user, void *target, char modechar, int type, bool mode_on, <a class="el" href="modules_8h.html#a11">string_list</a> &amp;params)</td></tr>
48 <tr><td>&nbsp;</td><td><font size=-1><em>Called whenever an extended mode is to be processed.</em> <a href="#a11"></a><em></em></font><br><br></td></tr>
49 <tr><td nowrap align=right valign=top>virtual int&nbsp;</td><td valign=bottom><a class="el" href="classModule.html#a12">OnUserPreJoin</a> (<a class="el" href="classuserrec.html">userrec</a> *user, <a class="el" href="classchanrec.html">chanrec</a> *chan, const char *cname)</td></tr>
50 <tr><td>&nbsp;</td><td><font size=-1><em>Called whenever a user is about to join a channel, before any processing is done.</em> <a href="#a12"></a><em></em></font><br><br></td></tr>
51 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classModule.html#a13">OnOper</a> (<a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
52 <tr><td>&nbsp;</td><td><font size=-1><em>Called whenever a user opers locally.</em> <a href="#a13"></a><em></em></font><br><br></td></tr>
53 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classModule.html#a14">OnInfo</a> (<a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
54 <tr><td>&nbsp;</td><td><font size=-1><em>Called whenever a user types /INFO.</em> <a href="#a14"></a><em></em></font><br><br></td></tr>
55 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classModule.html#a15">OnWhois</a> (<a class="el" href="classuserrec.html">userrec</a> *source, <a class="el" href="classuserrec.html">userrec</a> *dest)</td></tr>
56 <tr><td>&nbsp;</td><td><font size=-1><em>Called whenever a /WHOIS is performed on a local user.</em> <a href="#a15"></a><em></em></font><br><br></td></tr>
57 <tr><td nowrap align=right valign=top>virtual int&nbsp;</td><td valign=bottom><a class="el" href="classModule.html#a16">OnUserPreMessage</a> (<a class="el" href="classuserrec.html">userrec</a> *user, void *dest, int target_type, std::string text)</td></tr>
58 <tr><td>&nbsp;</td><td><font size=-1><em>Called whenever a user is about to PRIVMSG A user or a channel, before any processing is done.</em> <a href="#a16"></a><em></em></font><br><br></td></tr>
59 <tr><td nowrap align=right valign=top>virtual int&nbsp;</td><td valign=bottom><a class="el" href="classModule.html#a17">OnUserPreNotice</a> (<a class="el" href="classuserrec.html">userrec</a> *user, void *dest, int target_type, std::string text)</td></tr>
60 <tr><td>&nbsp;</td><td><font size=-1><em>Called whenever a user is about to NOTICE A user or a channel, before any processing is done.</em> <a href="#a17"></a><em></em></font><br><br></td></tr>
61 <tr><td nowrap align=right valign=top>virtual int&nbsp;</td><td valign=bottom><a class="el" href="classModule.html#a18">OnUserPreNick</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string newnick)</td></tr>
62 <tr><td>&nbsp;</td><td><font size=-1><em>Called before any nickchange, local or remote.</em> <a href="#a18"></a><em></em></font><br><br></td></tr>
63 </table>
64 <hr><a name="_details"></a><h2>Detailed Description</h2>
65 Base class for all InspIRCd modules This class is the base class for InspIRCd modules.
66 <p>
67 All modules must inherit from this class, its methods will be called when irc server events occur. class inherited from module must be instantiated by the <a class="el" href="classModuleFactory.html">ModuleFactory</a> class (see relevent section) for the plugin to be initialised. 
68 <p>
69
70 <p>
71 Definition at line <a class="el" href="modules_8h-source.html#l00092">92</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
72 <a name="a0" doxytag="Module::Module"></a><p>
73 <table width="100%" cellpadding="2" cellspacing="0" border="0">
74   <tr>
75     <td class="md">
76       <table cellpadding="0" cellspacing="0" border="0">
77         <tr>
78           <td class="md" nowrap valign="top"> Module::Module </td>
79           <td class="md" valign="top">(&nbsp;</td>
80           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
81           <td class="md" valign="top">)&nbsp;</td>
82           <td class="md" nowrap></td>
83         </tr>
84
85       </table>
86     </td>
87   </tr>
88 </table>
89 <table cellspacing=5 cellpadding=0 border=0>
90   <tr>
91     <td>
92       &nbsp;
93     </td>
94     <td>
95
96 <p>
97 Default constructor creates a module class.
98 <p>
99
100 <p>
101 Definition at line <a class="el" href="modules_8cpp-source.html#l00111">111</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
102 <p>
103 <div class="fragment"><pre>00111 { }
104 </pre></div>    </td>
105   </tr>
106 </table>
107 <a name="a1" doxytag="Module::~Module"></a><p>
108 <table width="100%" cellpadding="2" cellspacing="0" border="0">
109   <tr>
110     <td class="md">
111       <table cellpadding="0" cellspacing="0" border="0">
112         <tr>
113           <td class="md" nowrap valign="top"> Module::~Module </td>
114           <td class="md" valign="top">(&nbsp;</td>
115           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
116           <td class="md" valign="top">)&nbsp;</td>
117           <td class="md" nowrap><code> [virtual]</code></td>
118         </tr>
119
120       </table>
121     </td>
122   </tr>
123 </table>
124 <table cellspacing=5 cellpadding=0 border=0>
125   <tr>
126     <td>
127       &nbsp;
128     </td>
129     <td>
130
131 <p>
132 Default destructor destroys a module class.
133 <p>
134
135 <p>
136 Definition at line <a class="el" href="modules_8cpp-source.html#l00112">112</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
137 <p>
138 <div class="fragment"><pre>00112 { }
139 </pre></div>    </td>
140   </tr>
141 </table>
142 <hr><h2>Member Function Documentation</h2>
143 <a name="a2" doxytag="Module::GetVersion"></a><p>
144 <table width="100%" cellpadding="2" cellspacing="0" border="0">
145   <tr>
146     <td class="md">
147       <table cellpadding="0" cellspacing="0" border="0">
148         <tr>
149           <td class="md" nowrap valign="top"> <a class="el" href="classVersion.html">Version</a> Module::GetVersion </td>
150           <td class="md" valign="top">(&nbsp;</td>
151           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
152           <td class="md" valign="top">)&nbsp;</td>
153           <td class="md" nowrap><code> [virtual]</code></td>
154         </tr>
155
156       </table>
157     </td>
158   </tr>
159 </table>
160 <table cellspacing=5 cellpadding=0 border=0>
161   <tr>
162     <td>
163       &nbsp;
164     </td>
165     <td>
166
167 <p>
168 Returns the version number of a Module.
169 <p>
170 The method should return a <a class="el" href="classVersion.html">Version</a> object with its version information assigned via <a class="el" href="classVersion.html#a0">Version::Version</a>
171 <p>
172 Definition at line <a class="el" href="modules_8cpp-source.html#l00123">123</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
173 <p>
174 <div class="fragment"><pre>00123 { <span class="keywordflow">return</span> <a class="code" href="classVersion.html">Version</a>(1,0,0,0); }
175 </pre></div>    </td>
176   </tr>
177 </table>
178 <a name="a11" doxytag="Module::OnExtendedMode"></a><p>
179 <table width="100%" cellpadding="2" cellspacing="0" border="0">
180   <tr>
181     <td class="md">
182       <table cellpadding="0" cellspacing="0" border="0">
183         <tr>
184           <td class="md" nowrap valign="top"> bool Module::OnExtendedMode </td>
185           <td class="md" valign="top">(&nbsp;</td>
186           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
187           <td class="mdname" nowrap>&nbsp; <em>user</em>, </td>
188         </tr>
189         <tr>
190           <td></td>
191           <td></td>
192           <td class="md" nowrap>void *&nbsp;</td>
193           <td class="mdname" nowrap>&nbsp; <em>target</em>, </td>
194         </tr>
195         <tr>
196           <td></td>
197           <td></td>
198           <td class="md" nowrap>char&nbsp;</td>
199           <td class="mdname" nowrap>&nbsp; <em>modechar</em>, </td>
200         </tr>
201         <tr>
202           <td></td>
203           <td></td>
204           <td class="md" nowrap>int&nbsp;</td>
205           <td class="mdname" nowrap>&nbsp; <em>type</em>, </td>
206         </tr>
207         <tr>
208           <td></td>
209           <td></td>
210           <td class="md" nowrap>bool&nbsp;</td>
211           <td class="mdname" nowrap>&nbsp; <em>mode_on</em>, </td>
212         </tr>
213         <tr>
214           <td></td>
215           <td></td>
216           <td class="md" nowrap><a class="el" href="modules_8h.html#a11">string_list</a> &amp;&nbsp;</td>
217           <td class="mdname" nowrap>&nbsp; <em>params</em></td>
218         </tr>
219         <tr>
220           <td></td>
221           <td class="md">)&nbsp;</td>
222           <td class="md" colspan="2"><code> [virtual]</code></td>
223         </tr>
224
225       </table>
226     </td>
227   </tr>
228 </table>
229 <table cellspacing=5 cellpadding=0 border=0>
230   <tr>
231     <td>
232       &nbsp;
233     </td>
234     <td>
235
236 <p>
237 Called whenever an extended mode is to be processed.
238 <p>
239 The type parameter is MT_SERVER, MT_CLIENT or MT_CHANNEL, dependent on where the mode is being changed. mode_on is set when the mode is being set, in which case params contains a list of parameters for the mode as strings. If mode_on is false, the mode is being removed, and parameters may contain the parameters for the mode, dependent on wether they were defined when a mode handler was set up with <a class="el" href="classServer.html#a20">Server::AddExtendedMode</a> If the mode is a channel mode, target is a chanrec*, and if it is a user mode, target is a userrec*. You must cast this value yourself to make use of it.
240 <p>
241 Definition at line <a class="el" href="modules_8cpp-source.html#l00122">122</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
242 <p>
243 <div class="fragment"><pre>00122 { <span class="keywordflow">return</span> <span class="keyword">false</span>; }
244 </pre></div>    </td>
245   </tr>
246 </table>
247 <a name="a14" doxytag="Module::OnInfo"></a><p>
248 <table width="100%" cellpadding="2" cellspacing="0" border="0">
249   <tr>
250     <td class="md">
251       <table cellpadding="0" cellspacing="0" border="0">
252         <tr>
253           <td class="md" nowrap valign="top"> void Module::OnInfo </td>
254           <td class="md" valign="top">(&nbsp;</td>
255           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
256           <td class="mdname1" valign="top" nowrap>&nbsp; <em>user</em>          </td>
257           <td class="md" valign="top">)&nbsp;</td>
258           <td class="md" nowrap><code> [virtual]</code></td>
259         </tr>
260
261       </table>
262     </td>
263   </tr>
264 </table>
265 <table cellspacing=5 cellpadding=0 border=0>
266   <tr>
267     <td>
268       &nbsp;
269     </td>
270     <td>
271
272 <p>
273 Called whenever a user types /INFO.
274 <p>
275 The userrec will contain the information of the user who typed the command. Modules may use this method to output their own credits in /INFO (which is the ircd's version of an about box). It is purposefully not possible to modify any info that has already been output, or halt the list. You must write a 371 numeric to the user, containing your info in the following format:<p>
276 :information here
277 <p>
278 Definition at line <a class="el" href="modules_8cpp-source.html#l00125">125</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
279 <p>
280 <div class="fragment"><pre>00125 { };
281 </pre></div>    </td>
282   </tr>
283 </table>
284 <a name="a13" doxytag="Module::OnOper"></a><p>
285 <table width="100%" cellpadding="2" cellspacing="0" border="0">
286   <tr>
287     <td class="md">
288       <table cellpadding="0" cellspacing="0" border="0">
289         <tr>
290           <td class="md" nowrap valign="top"> void Module::OnOper </td>
291           <td class="md" valign="top">(&nbsp;</td>
292           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
293           <td class="mdname1" valign="top" nowrap>&nbsp; <em>user</em>          </td>
294           <td class="md" valign="top">)&nbsp;</td>
295           <td class="md" nowrap><code> [virtual]</code></td>
296         </tr>
297
298       </table>
299     </td>
300   </tr>
301 </table>
302 <table cellspacing=5 cellpadding=0 border=0>
303   <tr>
304     <td>
305       &nbsp;
306     </td>
307     <td>
308
309 <p>
310 Called whenever a user opers locally.
311 <p>
312 The userrec will contain the oper mode 'o' as this function is called after any modifications are made to the user's structure by the core.
313 <p>
314 Definition at line <a class="el" href="modules_8cpp-source.html#l00124">124</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
315 <p>
316 <div class="fragment"><pre>00124 { };
317 </pre></div>    </td>
318   </tr>
319 </table>
320 <a name="a8" doxytag="Module::OnPacketReceive"></a><p>
321 <table width="100%" cellpadding="2" cellspacing="0" border="0">
322   <tr>
323     <td class="md">
324       <table cellpadding="0" cellspacing="0" border="0">
325         <tr>
326           <td class="md" nowrap valign="top"> void Module::OnPacketReceive </td>
327           <td class="md" valign="top">(&nbsp;</td>
328           <td class="md" nowrap valign="top">char *&nbsp;</td>
329           <td class="mdname1" valign="top" nowrap>&nbsp; <em>p</em>          </td>
330           <td class="md" valign="top">)&nbsp;</td>
331           <td class="md" nowrap><code> [virtual]</code></td>
332         </tr>
333
334       </table>
335     </td>
336   </tr>
337 </table>
338 <table cellspacing=5 cellpadding=0 border=0>
339   <tr>
340     <td>
341       &nbsp;
342     </td>
343     <td>
344
345 <p>
346 Called after a packet is received from another irc server.
347 <p>
348 The packet is represented as a char*, as it should be regarded as a buffer, and not a string. This allows you to easily represent it in the correct ways to implement encryption, compression, digital signatures and anything else you may want to add. This should be regarded as a pre-processor and will be called immediately after the packet is received but before any other operations with the core of the ircd.
349 <p>
350 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>.
351 <p>
352 <div class="fragment"><pre>00118 { }
353 </pre></div>    </td>
354   </tr>
355 </table>
356 <a name="a7" doxytag="Module::OnPacketTransmit"></a><p>
357 <table width="100%" cellpadding="2" cellspacing="0" border="0">
358   <tr>
359     <td class="md">
360       <table cellpadding="0" cellspacing="0" border="0">
361         <tr>
362           <td class="md" nowrap valign="top"> void Module::OnPacketTransmit </td>
363           <td class="md" valign="top">(&nbsp;</td>
364           <td class="md" nowrap valign="top">char *&nbsp;</td>
365           <td class="mdname1" valign="top" nowrap>&nbsp; <em>p</em>          </td>
366           <td class="md" valign="top">)&nbsp;</td>
367           <td class="md" nowrap><code> [virtual]</code></td>
368         </tr>
369
370       </table>
371     </td>
372   </tr>
373 </table>
374 <table cellspacing=5 cellpadding=0 border=0>
375   <tr>
376     <td>
377       &nbsp;
378     </td>
379     <td>
380
381 <p>
382 Called before a packet is transmitted across the irc network between two irc servers.
383 <p>
384 The packet is represented as a char*, as it should be regarded as a buffer, and not a string. This allows you to easily represent it in the correct ways to implement encryption, compression, digital signatures and anything else you may want to add. This should be regarded as a pre-processor and will be called before ANY other operations within the ircd core program.
385 <p>
386 Definition at line <a class="el" href="modules_8cpp-source.html#l00117">117</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
387 <p>
388 <div class="fragment"><pre>00117 { }
389 </pre></div>    </td>
390   </tr>
391 </table>
392 <a name="a9" doxytag="Module::OnRehash"></a><p>
393 <table width="100%" cellpadding="2" cellspacing="0" border="0">
394   <tr>
395     <td class="md">
396       <table cellpadding="0" cellspacing="0" border="0">
397         <tr>
398           <td class="md" nowrap valign="top"> void Module::OnRehash </td>
399           <td class="md" valign="top">(&nbsp;</td>
400           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
401           <td class="md" valign="top">)&nbsp;</td>
402           <td class="md" nowrap><code> [virtual]</code></td>
403         </tr>
404
405       </table>
406     </td>
407   </tr>
408 </table>
409 <table cellspacing=5 cellpadding=0 border=0>
410   <tr>
411     <td>
412       &nbsp;
413     </td>
414     <td>
415
416 <p>
417 Called on rehash.
418 <p>
419 This method is called prior to a /REHASH or when a SIGHUP is received from the operating system. You should use it to reload any files so that your module keeps in step with the rest of the application.
420 <p>
421 Definition at line <a class="el" href="modules_8cpp-source.html#l00119">119</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
422 <p>
423 <div class="fragment"><pre>00119 { }
424 </pre></div>    </td>
425   </tr>
426 </table>
427 <a name="a10" doxytag="Module::OnServerRaw"></a><p>
428 <table width="100%" cellpadding="2" cellspacing="0" border="0">
429   <tr>
430     <td class="md">
431       <table cellpadding="0" cellspacing="0" border="0">
432         <tr>
433           <td class="md" nowrap valign="top"> void Module::OnServerRaw </td>
434           <td class="md" valign="top">(&nbsp;</td>
435           <td class="md" nowrap valign="top">std::string &amp;&nbsp;</td>
436           <td class="mdname" nowrap>&nbsp; <em>raw</em>, </td>
437         </tr>
438         <tr>
439           <td></td>
440           <td></td>
441           <td class="md" nowrap>bool&nbsp;</td>
442           <td class="mdname" nowrap>&nbsp; <em>inbound</em>, </td>
443         </tr>
444         <tr>
445           <td></td>
446           <td></td>
447           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
448           <td class="mdname" nowrap>&nbsp; <em>user</em></td>
449         </tr>
450         <tr>
451           <td></td>
452           <td class="md">)&nbsp;</td>
453           <td class="md" colspan="2"><code> [virtual]</code></td>
454         </tr>
455
456       </table>
457     </td>
458   </tr>
459 </table>
460 <table cellspacing=5 cellpadding=0 border=0>
461   <tr>
462     <td>
463       &nbsp;
464     </td>
465     <td>
466
467 <p>
468 Called when a raw command is transmitted or received.
469 <p>
470 This method is the lowest level of handler available to a module. It will be called with raw data which is passing through a connected socket. If you wish, you may munge this data by changing the string parameter "raw". If you do this, after your function exits it will immediately be cut down to 510 characters plus a carriage return and linefeed. For INBOUND messages only (where inbound is set to true) the value of user will be the userrec of the connection sending the data. This is not possible for outbound data because the data may be being routed to multiple targets.
471 <p>
472 Definition at line <a class="el" href="modules_8cpp-source.html#l00120">120</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
473 <p>
474 <div class="fragment"><pre>00120 { }
475 </pre></div>    </td>
476   </tr>
477 </table>
478 <a name="a3" doxytag="Module::OnUserConnect"></a><p>
479 <table width="100%" cellpadding="2" cellspacing="0" border="0">
480   <tr>
481     <td class="md">
482       <table cellpadding="0" cellspacing="0" border="0">
483         <tr>
484           <td class="md" nowrap valign="top"> void Module::OnUserConnect </td>
485           <td class="md" valign="top">(&nbsp;</td>
486           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
487           <td class="mdname1" valign="top" nowrap>&nbsp; <em>user</em>          </td>
488           <td class="md" valign="top">)&nbsp;</td>
489           <td class="md" nowrap><code> [virtual]</code></td>
490         </tr>
491
492       </table>
493     </td>
494   </tr>
495 </table>
496 <table cellspacing=5 cellpadding=0 border=0>
497   <tr>
498     <td>
499       &nbsp;
500     </td>
501     <td>
502
503 <p>
504 Called when a user connects.
505 <p>
506 The details of the connecting user are available to you in the parameter userrec *user
507 <p>
508 Definition at line <a class="el" href="modules_8cpp-source.html#l00113">113</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
509 <p>
510 <div class="fragment"><pre>00113 { }
511 </pre></div>    </td>
512   </tr>
513 </table>
514 <a name="a5" doxytag="Module::OnUserJoin"></a><p>
515 <table width="100%" cellpadding="2" cellspacing="0" border="0">
516   <tr>
517     <td class="md">
518       <table cellpadding="0" cellspacing="0" border="0">
519         <tr>
520           <td class="md" nowrap valign="top"> void Module::OnUserJoin </td>
521           <td class="md" valign="top">(&nbsp;</td>
522           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
523           <td class="mdname" nowrap>&nbsp; <em>user</em>, </td>
524         </tr>
525         <tr>
526           <td></td>
527           <td></td>
528           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
529           <td class="mdname" nowrap>&nbsp; <em>channel</em></td>
530         </tr>
531         <tr>
532           <td></td>
533           <td class="md">)&nbsp;</td>
534           <td class="md" colspan="2"><code> [virtual]</code></td>
535         </tr>
536
537       </table>
538     </td>
539   </tr>
540 </table>
541 <table cellspacing=5 cellpadding=0 border=0>
542   <tr>
543     <td>
544       &nbsp;
545     </td>
546     <td>
547
548 <p>
549 Called when a user joins a channel.
550 <p>
551 The details of the joining user are available to you in the parameter userrec *user, and the details of the channel they have joined is available in the variable chanrec *channel
552 <p>
553 Definition at line <a class="el" href="modules_8cpp-source.html#l00115">115</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
554 <p>
555 <div class="fragment"><pre>00115 { }
556 </pre></div>    </td>
557   </tr>
558 </table>
559 <a name="a6" doxytag="Module::OnUserPart"></a><p>
560 <table width="100%" cellpadding="2" cellspacing="0" border="0">
561   <tr>
562     <td class="md">
563       <table cellpadding="0" cellspacing="0" border="0">
564         <tr>
565           <td class="md" nowrap valign="top"> void Module::OnUserPart </td>
566           <td class="md" valign="top">(&nbsp;</td>
567           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
568           <td class="mdname" nowrap>&nbsp; <em>user</em>, </td>
569         </tr>
570         <tr>
571           <td></td>
572           <td></td>
573           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
574           <td class="mdname" nowrap>&nbsp; <em>channel</em></td>
575         </tr>
576         <tr>
577           <td></td>
578           <td class="md">)&nbsp;</td>
579           <td class="md" colspan="2"><code> [virtual]</code></td>
580         </tr>
581
582       </table>
583     </td>
584   </tr>
585 </table>
586 <table cellspacing=5 cellpadding=0 border=0>
587   <tr>
588     <td>
589       &nbsp;
590     </td>
591     <td>
592
593 <p>
594 Called when a user parts a channel.
595 <p>
596 The details of the leaving user are available to you in the parameter userrec *user, and the details of the channel they have left is available in the variable chanrec *channel
597 <p>
598 Definition at line <a class="el" href="modules_8cpp-source.html#l00116">116</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
599 <p>
600 <div class="fragment"><pre>00116 { }
601 </pre></div>    </td>
602   </tr>
603 </table>
604 <a name="a12" doxytag="Module::OnUserPreJoin"></a><p>
605 <table width="100%" cellpadding="2" cellspacing="0" border="0">
606   <tr>
607     <td class="md">
608       <table cellpadding="0" cellspacing="0" border="0">
609         <tr>
610           <td class="md" nowrap valign="top"> int Module::OnUserPreJoin </td>
611           <td class="md" valign="top">(&nbsp;</td>
612           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
613           <td class="mdname" nowrap>&nbsp; <em>user</em>, </td>
614         </tr>
615         <tr>
616           <td></td>
617           <td></td>
618           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
619           <td class="mdname" nowrap>&nbsp; <em>chan</em>, </td>
620         </tr>
621         <tr>
622           <td></td>
623           <td></td>
624           <td class="md" nowrap>const char *&nbsp;</td>
625           <td class="mdname" nowrap>&nbsp; <em>cname</em></td>
626         </tr>
627         <tr>
628           <td></td>
629           <td class="md">)&nbsp;</td>
630           <td class="md" colspan="2"><code> [virtual]</code></td>
631         </tr>
632
633       </table>
634     </td>
635   </tr>
636 </table>
637 <table cellspacing=5 cellpadding=0 border=0>
638   <tr>
639     <td>
640       &nbsp;
641     </td>
642     <td>
643
644 <p>
645 Called whenever a user is about to join a channel, before any processing is done.
646 <p>
647 Returning any nonzero value from this function stops the process immediately, causing no output to be sent to the user by the core. If you do this you must produce your own numerics, notices etc. This is useful for modules which may want to mimic +b, +k, +l etc.<p>
648 IMPORTANT NOTE!<p>
649 If the user joins a NEW channel which does not exist yet, OnUserPreJoin will be called BEFORE the channel record is created. This will cause chanrec* chan to be NULL. There is very little you can do in form of processing on the actual channel record at this point, however the channel NAME will still be passed in char* cname, so that you could for example implement a channel blacklist or whitelist, etc.
650 <p>
651 Definition at line <a class="el" href="modules_8cpp-source.html#l00121">121</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
652 <p>
653 <div class="fragment"><pre>00121 { <span class="keywordflow">return</span> 0; }
654 </pre></div>    </td>
655   </tr>
656 </table>
657 <a name="a16" doxytag="Module::OnUserPreMessage"></a><p>
658 <table width="100%" cellpadding="2" cellspacing="0" border="0">
659   <tr>
660     <td class="md">
661       <table cellpadding="0" cellspacing="0" border="0">
662         <tr>
663           <td class="md" nowrap valign="top"> int Module::OnUserPreMessage </td>
664           <td class="md" valign="top">(&nbsp;</td>
665           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
666           <td class="mdname" nowrap>&nbsp; <em>user</em>, </td>
667         </tr>
668         <tr>
669           <td></td>
670           <td></td>
671           <td class="md" nowrap>void *&nbsp;</td>
672           <td class="mdname" nowrap>&nbsp; <em>dest</em>, </td>
673         </tr>
674         <tr>
675           <td></td>
676           <td></td>
677           <td class="md" nowrap>int&nbsp;</td>
678           <td class="mdname" nowrap>&nbsp; <em>target_type</em>, </td>
679         </tr>
680         <tr>
681           <td></td>
682           <td></td>
683           <td class="md" nowrap>std::string&nbsp;</td>
684           <td class="mdname" nowrap>&nbsp; <em>text</em></td>
685         </tr>
686         <tr>
687           <td></td>
688           <td class="md">)&nbsp;</td>
689           <td class="md" colspan="2"><code> [virtual]</code></td>
690         </tr>
691
692       </table>
693     </td>
694   </tr>
695 </table>
696 <table cellspacing=5 cellpadding=0 border=0>
697   <tr>
698     <td>
699       &nbsp;
700     </td>
701     <td>
702
703 <p>
704 Called whenever a user is about to PRIVMSG A user or a channel, before any processing is done.
705 <p>
706 Returning any nonzero value from this function stops the process immediately, causing no output to be sent to the user by the core. If you do this you must produce your own numerics, notices etc. This is useful for modules which may want to filter or redirect messages. target_type can be one of TYPE_USER or TYPE_CHANNEL. If the target_type value is a user, you must cast dest to a userrec* otherwise you must cast it to a chanrec*, this is the details of where the message is destined to be sent.
707 <p>
708 Definition at line <a class="el" href="modules_8cpp-source.html#l00127">127</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
709 <p>
710 <div class="fragment"><pre>00127 { <span class="keywordflow">return</span> 0; };
711 </pre></div>    </td>
712   </tr>
713 </table>
714 <a name="a18" doxytag="Module::OnUserPreNick"></a><p>
715 <table width="100%" cellpadding="2" cellspacing="0" border="0">
716   <tr>
717     <td class="md">
718       <table cellpadding="0" cellspacing="0" border="0">
719         <tr>
720           <td class="md" nowrap valign="top"> int Module::OnUserPreNick </td>
721           <td class="md" valign="top">(&nbsp;</td>
722           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
723           <td class="mdname" nowrap>&nbsp; <em>user</em>, </td>
724         </tr>
725         <tr>
726           <td></td>
727           <td></td>
728           <td class="md" nowrap>std::string&nbsp;</td>
729           <td class="mdname" nowrap>&nbsp; <em>newnick</em></td>
730         </tr>
731         <tr>
732           <td></td>
733           <td class="md">)&nbsp;</td>
734           <td class="md" colspan="2"><code> [virtual]</code></td>
735         </tr>
736
737       </table>
738     </td>
739   </tr>
740 </table>
741 <table cellspacing=5 cellpadding=0 border=0>
742   <tr>
743     <td>
744       &nbsp;
745     </td>
746     <td>
747
748 <p>
749 Called before any nickchange, local or remote.
750 <p>
751 This can be used to implement Q-lines etc. Please note that although you can see remote nickchanges through this function, you should NOT make any changes to the userrec if the user is a remote user as this may cause a desnyc. check user-&gt;server before taking any action (including returning nonzero from the method). If your method returns nonzero, the nickchange is silently forbidden, and it is down to your module to generate some meaninful output.
752 <p>
753 Definition at line <a class="el" href="modules_8cpp-source.html#l00129">129</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
754 <p>
755 <div class="fragment"><pre>00129 { <span class="keywordflow">return</span> 0; };
756 </pre></div>    </td>
757   </tr>
758 </table>
759 <a name="a17" doxytag="Module::OnUserPreNotice"></a><p>
760 <table width="100%" cellpadding="2" cellspacing="0" border="0">
761   <tr>
762     <td class="md">
763       <table cellpadding="0" cellspacing="0" border="0">
764         <tr>
765           <td class="md" nowrap valign="top"> int Module::OnUserPreNotice </td>
766           <td class="md" valign="top">(&nbsp;</td>
767           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
768           <td class="mdname" nowrap>&nbsp; <em>user</em>, </td>
769         </tr>
770         <tr>
771           <td></td>
772           <td></td>
773           <td class="md" nowrap>void *&nbsp;</td>
774           <td class="mdname" nowrap>&nbsp; <em>dest</em>, </td>
775         </tr>
776         <tr>
777           <td></td>
778           <td></td>
779           <td class="md" nowrap>int&nbsp;</td>
780           <td class="mdname" nowrap>&nbsp; <em>target_type</em>, </td>
781         </tr>
782         <tr>
783           <td></td>
784           <td></td>
785           <td class="md" nowrap>std::string&nbsp;</td>
786           <td class="mdname" nowrap>&nbsp; <em>text</em></td>
787         </tr>
788         <tr>
789           <td></td>
790           <td class="md">)&nbsp;</td>
791           <td class="md" colspan="2"><code> [virtual]</code></td>
792         </tr>
793
794       </table>
795     </td>
796   </tr>
797 </table>
798 <table cellspacing=5 cellpadding=0 border=0>
799   <tr>
800     <td>
801       &nbsp;
802     </td>
803     <td>
804
805 <p>
806 Called whenever a user is about to NOTICE A user or a channel, before any processing is done.
807 <p>
808 Returning any nonzero value from this function stops the process immediately, causing no output to be sent to the user by the core. If you do this you must produce your own numerics, notices etc. This is useful for modules which may want to filter or redirect messages. target_type can be one of TYPE_USER or TYPE_CHANNEL. If the target_type value is a user, you must cast dest to a userrec* otherwise you must cast it to a chanrec*, this is the details of where the message is destined to be sent.
809 <p>
810 Definition at line <a class="el" href="modules_8cpp-source.html#l00128">128</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
811 <p>
812 <div class="fragment"><pre>00128 { <span class="keywordflow">return</span> 0; };
813 </pre></div>    </td>
814   </tr>
815 </table>
816 <a name="a4" doxytag="Module::OnUserQuit"></a><p>
817 <table width="100%" cellpadding="2" cellspacing="0" border="0">
818   <tr>
819     <td class="md">
820       <table cellpadding="0" cellspacing="0" border="0">
821         <tr>
822           <td class="md" nowrap valign="top"> void Module::OnUserQuit </td>
823           <td class="md" valign="top">(&nbsp;</td>
824           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
825           <td class="mdname1" valign="top" nowrap>&nbsp; <em>user</em>          </td>
826           <td class="md" valign="top">)&nbsp;</td>
827           <td class="md" nowrap><code> [virtual]</code></td>
828         </tr>
829
830       </table>
831     </td>
832   </tr>
833 </table>
834 <table cellspacing=5 cellpadding=0 border=0>
835   <tr>
836     <td>
837       &nbsp;
838     </td>
839     <td>
840
841 <p>
842 Called when a user quits.
843 <p>
844 The details of the exiting user are available to you in the parameter userrec *user
845 <p>
846 Definition at line <a class="el" href="modules_8cpp-source.html#l00114">114</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
847 <p>
848 <div class="fragment"><pre>00114 { }
849 </pre></div>    </td>
850   </tr>
851 </table>
852 <a name="a15" doxytag="Module::OnWhois"></a><p>
853 <table width="100%" cellpadding="2" cellspacing="0" border="0">
854   <tr>
855     <td class="md">
856       <table cellpadding="0" cellspacing="0" border="0">
857         <tr>
858           <td class="md" nowrap valign="top"> void Module::OnWhois </td>
859           <td class="md" valign="top">(&nbsp;</td>
860           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
861           <td class="mdname" nowrap>&nbsp; <em>source</em>, </td>
862         </tr>
863         <tr>
864           <td></td>
865           <td></td>
866           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
867           <td class="mdname" nowrap>&nbsp; <em>dest</em></td>
868         </tr>
869         <tr>
870           <td></td>
871           <td class="md">)&nbsp;</td>
872           <td class="md" colspan="2"><code> [virtual]</code></td>
873         </tr>
874
875       </table>
876     </td>
877   </tr>
878 </table>
879 <table cellspacing=5 cellpadding=0 border=0>
880   <tr>
881     <td>
882       &nbsp;
883     </td>
884     <td>
885
886 <p>
887 Called whenever a /WHOIS is performed on a local user.
888 <p>
889 The source parameter contains the details of the user who issued the WHOIS command, and the dest parameter contains the information of the user they are whoising.
890 <p>
891 Definition at line <a class="el" href="modules_8cpp-source.html#l00126">126</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
892 <p>
893 <div class="fragment"><pre>00126 { };
894 </pre></div>    </td>
895   </tr>
896 </table>
897 <hr>The documentation for this class was generated from the following files:<ul>
898 <li><a class="el" href="modules_8h-source.html">modules.h</a><li><a class="el" href="modules_8cpp-source.html">modules.cpp</a></ul>
899 <hr><address style="align: right;"><small>Generated on Thu Apr 29 16:30:56 2004 for InspIRCd by
900 <a href="http://www.doxygen.org/index.html">
901 <img src="doxygen.png" alt="doxygen" align="middle" border=0 
902 width=110 height=53></a>1.3-rc3 </small></address>
903 </body>
904 </html>