]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/classModule.html
Added new documentation for XLine etc
[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)</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 class="md">)&nbsp;</td>
447           <td class="md" colspan="2"><code> [virtual]</code></td>
448         </tr>
449
450       </table>
451     </td>
452   </tr>
453 </table>
454 <table cellspacing=5 cellpadding=0 border=0>
455   <tr>
456     <td>
457       &nbsp;
458     </td>
459     <td>
460
461 <p>
462 Called when a raw command is transmitted or received.
463 <p>
464 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.
465 <p>
466 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>.
467 <p>
468 <div class="fragment"><pre>00120 { }
469 </pre></div>    </td>
470   </tr>
471 </table>
472 <a name="a3" doxytag="Module::OnUserConnect"></a><p>
473 <table width="100%" cellpadding="2" cellspacing="0" border="0">
474   <tr>
475     <td class="md">
476       <table cellpadding="0" cellspacing="0" border="0">
477         <tr>
478           <td class="md" nowrap valign="top"> void Module::OnUserConnect </td>
479           <td class="md" valign="top">(&nbsp;</td>
480           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
481           <td class="mdname1" valign="top" nowrap>&nbsp; <em>user</em>          </td>
482           <td class="md" valign="top">)&nbsp;</td>
483           <td class="md" nowrap><code> [virtual]</code></td>
484         </tr>
485
486       </table>
487     </td>
488   </tr>
489 </table>
490 <table cellspacing=5 cellpadding=0 border=0>
491   <tr>
492     <td>
493       &nbsp;
494     </td>
495     <td>
496
497 <p>
498 Called when a user connects.
499 <p>
500 The details of the connecting user are available to you in the parameter userrec *user
501 <p>
502 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>.
503 <p>
504 <div class="fragment"><pre>00113 { }
505 </pre></div>    </td>
506   </tr>
507 </table>
508 <a name="a5" doxytag="Module::OnUserJoin"></a><p>
509 <table width="100%" cellpadding="2" cellspacing="0" border="0">
510   <tr>
511     <td class="md">
512       <table cellpadding="0" cellspacing="0" border="0">
513         <tr>
514           <td class="md" nowrap valign="top"> void Module::OnUserJoin </td>
515           <td class="md" valign="top">(&nbsp;</td>
516           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
517           <td class="mdname" nowrap>&nbsp; <em>user</em>, </td>
518         </tr>
519         <tr>
520           <td></td>
521           <td></td>
522           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
523           <td class="mdname" nowrap>&nbsp; <em>channel</em></td>
524         </tr>
525         <tr>
526           <td></td>
527           <td class="md">)&nbsp;</td>
528           <td class="md" colspan="2"><code> [virtual]</code></td>
529         </tr>
530
531       </table>
532     </td>
533   </tr>
534 </table>
535 <table cellspacing=5 cellpadding=0 border=0>
536   <tr>
537     <td>
538       &nbsp;
539     </td>
540     <td>
541
542 <p>
543 Called when a user joins a channel.
544 <p>
545 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
546 <p>
547 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>.
548 <p>
549 <div class="fragment"><pre>00115 { }
550 </pre></div>    </td>
551   </tr>
552 </table>
553 <a name="a6" doxytag="Module::OnUserPart"></a><p>
554 <table width="100%" cellpadding="2" cellspacing="0" border="0">
555   <tr>
556     <td class="md">
557       <table cellpadding="0" cellspacing="0" border="0">
558         <tr>
559           <td class="md" nowrap valign="top"> void Module::OnUserPart </td>
560           <td class="md" valign="top">(&nbsp;</td>
561           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
562           <td class="mdname" nowrap>&nbsp; <em>user</em>, </td>
563         </tr>
564         <tr>
565           <td></td>
566           <td></td>
567           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
568           <td class="mdname" nowrap>&nbsp; <em>channel</em></td>
569         </tr>
570         <tr>
571           <td></td>
572           <td class="md">)&nbsp;</td>
573           <td class="md" colspan="2"><code> [virtual]</code></td>
574         </tr>
575
576       </table>
577     </td>
578   </tr>
579 </table>
580 <table cellspacing=5 cellpadding=0 border=0>
581   <tr>
582     <td>
583       &nbsp;
584     </td>
585     <td>
586
587 <p>
588 Called when a user parts a channel.
589 <p>
590 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
591 <p>
592 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>.
593 <p>
594 <div class="fragment"><pre>00116 { }
595 </pre></div>    </td>
596   </tr>
597 </table>
598 <a name="a12" doxytag="Module::OnUserPreJoin"></a><p>
599 <table width="100%" cellpadding="2" cellspacing="0" border="0">
600   <tr>
601     <td class="md">
602       <table cellpadding="0" cellspacing="0" border="0">
603         <tr>
604           <td class="md" nowrap valign="top"> int Module::OnUserPreJoin </td>
605           <td class="md" valign="top">(&nbsp;</td>
606           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
607           <td class="mdname" nowrap>&nbsp; <em>user</em>, </td>
608         </tr>
609         <tr>
610           <td></td>
611           <td></td>
612           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
613           <td class="mdname" nowrap>&nbsp; <em>chan</em>, </td>
614         </tr>
615         <tr>
616           <td></td>
617           <td></td>
618           <td class="md" nowrap>const char *&nbsp;</td>
619           <td class="mdname" nowrap>&nbsp; <em>cname</em></td>
620         </tr>
621         <tr>
622           <td></td>
623           <td class="md">)&nbsp;</td>
624           <td class="md" colspan="2"><code> [virtual]</code></td>
625         </tr>
626
627       </table>
628     </td>
629   </tr>
630 </table>
631 <table cellspacing=5 cellpadding=0 border=0>
632   <tr>
633     <td>
634       &nbsp;
635     </td>
636     <td>
637
638 <p>
639 Called whenever a user is about to join a channel, before any processing is done.
640 <p>
641 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>
642 IMPORTANT NOTE!<p>
643 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.
644 <p>
645 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>.
646 <p>
647 <div class="fragment"><pre>00121 { <span class="keywordflow">return</span> 0; }
648 </pre></div>    </td>
649   </tr>
650 </table>
651 <a name="a16" doxytag="Module::OnUserPreMessage"></a><p>
652 <table width="100%" cellpadding="2" cellspacing="0" border="0">
653   <tr>
654     <td class="md">
655       <table cellpadding="0" cellspacing="0" border="0">
656         <tr>
657           <td class="md" nowrap valign="top"> int Module::OnUserPreMessage </td>
658           <td class="md" valign="top">(&nbsp;</td>
659           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
660           <td class="mdname" nowrap>&nbsp; <em>user</em>, </td>
661         </tr>
662         <tr>
663           <td></td>
664           <td></td>
665           <td class="md" nowrap>void *&nbsp;</td>
666           <td class="mdname" nowrap>&nbsp; <em>dest</em>, </td>
667         </tr>
668         <tr>
669           <td></td>
670           <td></td>
671           <td class="md" nowrap>int&nbsp;</td>
672           <td class="mdname" nowrap>&nbsp; <em>target_type</em>, </td>
673         </tr>
674         <tr>
675           <td></td>
676           <td></td>
677           <td class="md" nowrap>std::string&nbsp;</td>
678           <td class="mdname" nowrap>&nbsp; <em>text</em></td>
679         </tr>
680         <tr>
681           <td></td>
682           <td class="md">)&nbsp;</td>
683           <td class="md" colspan="2"><code> [virtual]</code></td>
684         </tr>
685
686       </table>
687     </td>
688   </tr>
689 </table>
690 <table cellspacing=5 cellpadding=0 border=0>
691   <tr>
692     <td>
693       &nbsp;
694     </td>
695     <td>
696
697 <p>
698 Called whenever a user is about to PRIVMSG A user or a channel, before any processing is done.
699 <p>
700 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.
701 <p>
702 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>.
703 <p>
704 <div class="fragment"><pre>00127 { <span class="keywordflow">return</span> 0; };
705 </pre></div>    </td>
706   </tr>
707 </table>
708 <a name="a18" doxytag="Module::OnUserPreNick"></a><p>
709 <table width="100%" cellpadding="2" cellspacing="0" border="0">
710   <tr>
711     <td class="md">
712       <table cellpadding="0" cellspacing="0" border="0">
713         <tr>
714           <td class="md" nowrap valign="top"> int Module::OnUserPreNick </td>
715           <td class="md" valign="top">(&nbsp;</td>
716           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
717           <td class="mdname" nowrap>&nbsp; <em>user</em>, </td>
718         </tr>
719         <tr>
720           <td></td>
721           <td></td>
722           <td class="md" nowrap>std::string&nbsp;</td>
723           <td class="mdname" nowrap>&nbsp; <em>newnick</em></td>
724         </tr>
725         <tr>
726           <td></td>
727           <td class="md">)&nbsp;</td>
728           <td class="md" colspan="2"><code> [virtual]</code></td>
729         </tr>
730
731       </table>
732     </td>
733   </tr>
734 </table>
735 <table cellspacing=5 cellpadding=0 border=0>
736   <tr>
737     <td>
738       &nbsp;
739     </td>
740     <td>
741
742 <p>
743 Called before any nickchange, local or remote.
744 <p>
745 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.
746 <p>
747 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>.
748 <p>
749 <div class="fragment"><pre>00129 { <span class="keywordflow">return</span> 0; };
750 </pre></div>    </td>
751   </tr>
752 </table>
753 <a name="a17" doxytag="Module::OnUserPreNotice"></a><p>
754 <table width="100%" cellpadding="2" cellspacing="0" border="0">
755   <tr>
756     <td class="md">
757       <table cellpadding="0" cellspacing="0" border="0">
758         <tr>
759           <td class="md" nowrap valign="top"> int Module::OnUserPreNotice </td>
760           <td class="md" valign="top">(&nbsp;</td>
761           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
762           <td class="mdname" nowrap>&nbsp; <em>user</em>, </td>
763         </tr>
764         <tr>
765           <td></td>
766           <td></td>
767           <td class="md" nowrap>void *&nbsp;</td>
768           <td class="mdname" nowrap>&nbsp; <em>dest</em>, </td>
769         </tr>
770         <tr>
771           <td></td>
772           <td></td>
773           <td class="md" nowrap>int&nbsp;</td>
774           <td class="mdname" nowrap>&nbsp; <em>target_type</em>, </td>
775         </tr>
776         <tr>
777           <td></td>
778           <td></td>
779           <td class="md" nowrap>std::string&nbsp;</td>
780           <td class="mdname" nowrap>&nbsp; <em>text</em></td>
781         </tr>
782         <tr>
783           <td></td>
784           <td class="md">)&nbsp;</td>
785           <td class="md" colspan="2"><code> [virtual]</code></td>
786         </tr>
787
788       </table>
789     </td>
790   </tr>
791 </table>
792 <table cellspacing=5 cellpadding=0 border=0>
793   <tr>
794     <td>
795       &nbsp;
796     </td>
797     <td>
798
799 <p>
800 Called whenever a user is about to NOTICE A user or a channel, before any processing is done.
801 <p>
802 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.
803 <p>
804 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>.
805 <p>
806 <div class="fragment"><pre>00128 { <span class="keywordflow">return</span> 0; };
807 </pre></div>    </td>
808   </tr>
809 </table>
810 <a name="a4" doxytag="Module::OnUserQuit"></a><p>
811 <table width="100%" cellpadding="2" cellspacing="0" border="0">
812   <tr>
813     <td class="md">
814       <table cellpadding="0" cellspacing="0" border="0">
815         <tr>
816           <td class="md" nowrap valign="top"> void Module::OnUserQuit </td>
817           <td class="md" valign="top">(&nbsp;</td>
818           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
819           <td class="mdname1" valign="top" nowrap>&nbsp; <em>user</em>          </td>
820           <td class="md" valign="top">)&nbsp;</td>
821           <td class="md" nowrap><code> [virtual]</code></td>
822         </tr>
823
824       </table>
825     </td>
826   </tr>
827 </table>
828 <table cellspacing=5 cellpadding=0 border=0>
829   <tr>
830     <td>
831       &nbsp;
832     </td>
833     <td>
834
835 <p>
836 Called when a user quits.
837 <p>
838 The details of the exiting user are available to you in the parameter userrec *user
839 <p>
840 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>.
841 <p>
842 <div class="fragment"><pre>00114 { }
843 </pre></div>    </td>
844   </tr>
845 </table>
846 <a name="a15" doxytag="Module::OnWhois"></a><p>
847 <table width="100%" cellpadding="2" cellspacing="0" border="0">
848   <tr>
849     <td class="md">
850       <table cellpadding="0" cellspacing="0" border="0">
851         <tr>
852           <td class="md" nowrap valign="top"> void Module::OnWhois </td>
853           <td class="md" valign="top">(&nbsp;</td>
854           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
855           <td class="mdname" nowrap>&nbsp; <em>source</em>, </td>
856         </tr>
857         <tr>
858           <td></td>
859           <td></td>
860           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
861           <td class="mdname" nowrap>&nbsp; <em>dest</em></td>
862         </tr>
863         <tr>
864           <td></td>
865           <td class="md">)&nbsp;</td>
866           <td class="md" colspan="2"><code> [virtual]</code></td>
867         </tr>
868
869       </table>
870     </td>
871   </tr>
872 </table>
873 <table cellspacing=5 cellpadding=0 border=0>
874   <tr>
875     <td>
876       &nbsp;
877     </td>
878     <td>
879
880 <p>
881 Called whenever a /WHOIS is performed on a local user.
882 <p>
883 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.
884 <p>
885 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>.
886 <p>
887 <div class="fragment"><pre>00126 { };
888 </pre></div>    </td>
889   </tr>
890 </table>
891 <hr>The documentation for this class was generated from the following files:<ul>
892 <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>
893 <hr><address style="align: right;"><small>Generated on Sun Apr 25 00:24:26 2004 for InspIRCd by
894 <a href="http://www.doxygen.org/index.html">
895 <img src="doxygen.png" alt="doxygen" align="middle" border=0 
896 width=110 height=53></a>1.3-rc3 </small></address>
897 </body>
898 </html>