]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/classModule.html
New documentation for new ConfigReader methods
[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 </table>
62 <hr><a name="_details"></a><h2>Detailed Description</h2>
63 Base class for all InspIRCd modules This class is the base class for InspIRCd modules.
64 <p>
65 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. 
66 <p>
67
68 <p>
69 Definition at line <a class="el" href="modules_8h-source.html#l00091">91</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
70 <a name="a0" doxytag="Module::Module"></a><p>
71 <table width="100%" cellpadding="2" cellspacing="0" border="0">
72   <tr>
73     <td class="md">
74       <table cellpadding="0" cellspacing="0" border="0">
75         <tr>
76           <td class="md" nowrap valign="top"> Module::Module </td>
77           <td class="md" valign="top">(&nbsp;</td>
78           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
79           <td class="md" valign="top">)&nbsp;</td>
80           <td class="md" nowrap></td>
81         </tr>
82
83       </table>
84     </td>
85   </tr>
86 </table>
87 <table cellspacing=5 cellpadding=0 border=0>
88   <tr>
89     <td>
90       &nbsp;
91     </td>
92     <td>
93
94 <p>
95 Default constructor creates a module class.
96 <p>
97
98 <p>
99 Definition at line <a class="el" href="modules_8cpp-source.html#l00108">108</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
100 <p>
101 <div class="fragment"><pre>00108 { }
102 </pre></div>    </td>
103   </tr>
104 </table>
105 <a name="a1" doxytag="Module::~Module"></a><p>
106 <table width="100%" cellpadding="2" cellspacing="0" border="0">
107   <tr>
108     <td class="md">
109       <table cellpadding="0" cellspacing="0" border="0">
110         <tr>
111           <td class="md" nowrap valign="top"> Module::~Module </td>
112           <td class="md" valign="top">(&nbsp;</td>
113           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
114           <td class="md" valign="top">)&nbsp;</td>
115           <td class="md" nowrap><code> [virtual]</code></td>
116         </tr>
117
118       </table>
119     </td>
120   </tr>
121 </table>
122 <table cellspacing=5 cellpadding=0 border=0>
123   <tr>
124     <td>
125       &nbsp;
126     </td>
127     <td>
128
129 <p>
130 Default destructor destroys a module class.
131 <p>
132
133 <p>
134 Definition at line <a class="el" href="modules_8cpp-source.html#l00109">109</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
135 <p>
136 <div class="fragment"><pre>00109 { }
137 </pre></div>    </td>
138   </tr>
139 </table>
140 <hr><h2>Member Function Documentation</h2>
141 <a name="a2" doxytag="Module::GetVersion"></a><p>
142 <table width="100%" cellpadding="2" cellspacing="0" border="0">
143   <tr>
144     <td class="md">
145       <table cellpadding="0" cellspacing="0" border="0">
146         <tr>
147           <td class="md" nowrap valign="top"> <a class="el" href="classVersion.html">Version</a> Module::GetVersion </td>
148           <td class="md" valign="top">(&nbsp;</td>
149           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
150           <td class="md" valign="top">)&nbsp;</td>
151           <td class="md" nowrap><code> [virtual]</code></td>
152         </tr>
153
154       </table>
155     </td>
156   </tr>
157 </table>
158 <table cellspacing=5 cellpadding=0 border=0>
159   <tr>
160     <td>
161       &nbsp;
162     </td>
163     <td>
164
165 <p>
166 Returns the version number of a Module.
167 <p>
168 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>
169 <p>
170 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>.
171 <p>
172 <div class="fragment"><pre>00120 { <span class="keywordflow">return</span> <a class="code" href="classVersion.html">Version</a>(1,0,0,0); }
173 </pre></div>    </td>
174   </tr>
175 </table>
176 <a name="a11" doxytag="Module::OnExtendedMode"></a><p>
177 <table width="100%" cellpadding="2" cellspacing="0" border="0">
178   <tr>
179     <td class="md">
180       <table cellpadding="0" cellspacing="0" border="0">
181         <tr>
182           <td class="md" nowrap valign="top"> bool Module::OnExtendedMode </td>
183           <td class="md" valign="top">(&nbsp;</td>
184           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
185           <td class="mdname" nowrap>&nbsp; <em>user</em>, </td>
186         </tr>
187         <tr>
188           <td></td>
189           <td></td>
190           <td class="md" nowrap>void *&nbsp;</td>
191           <td class="mdname" nowrap>&nbsp; <em>target</em>, </td>
192         </tr>
193         <tr>
194           <td></td>
195           <td></td>
196           <td class="md" nowrap>char&nbsp;</td>
197           <td class="mdname" nowrap>&nbsp; <em>modechar</em>, </td>
198         </tr>
199         <tr>
200           <td></td>
201           <td></td>
202           <td class="md" nowrap>int&nbsp;</td>
203           <td class="mdname" nowrap>&nbsp; <em>type</em>, </td>
204         </tr>
205         <tr>
206           <td></td>
207           <td></td>
208           <td class="md" nowrap>bool&nbsp;</td>
209           <td class="mdname" nowrap>&nbsp; <em>mode_on</em>, </td>
210         </tr>
211         <tr>
212           <td></td>
213           <td></td>
214           <td class="md" nowrap><a class="el" href="modules_8h.html#a11">string_list</a> &amp;&nbsp;</td>
215           <td class="mdname" nowrap>&nbsp; <em>params</em></td>
216         </tr>
217         <tr>
218           <td></td>
219           <td class="md">)&nbsp;</td>
220           <td class="md" colspan="2"><code> [virtual]</code></td>
221         </tr>
222
223       </table>
224     </td>
225   </tr>
226 </table>
227 <table cellspacing=5 cellpadding=0 border=0>
228   <tr>
229     <td>
230       &nbsp;
231     </td>
232     <td>
233
234 <p>
235 Called whenever an extended mode is to be processed.
236 <p>
237 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.
238 <p>
239 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>.
240 <p>
241 <div class="fragment"><pre>00119 { <span class="keywordflow">return</span> <span class="keyword">false</span>; }
242 </pre></div>    </td>
243   </tr>
244 </table>
245 <a name="a14" doxytag="Module::OnInfo"></a><p>
246 <table width="100%" cellpadding="2" cellspacing="0" border="0">
247   <tr>
248     <td class="md">
249       <table cellpadding="0" cellspacing="0" border="0">
250         <tr>
251           <td class="md" nowrap valign="top"> void Module::OnInfo </td>
252           <td class="md" valign="top">(&nbsp;</td>
253           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
254           <td class="mdname1" valign="top" nowrap>&nbsp; <em>user</em>          </td>
255           <td class="md" valign="top">)&nbsp;</td>
256           <td class="md" nowrap><code> [virtual]</code></td>
257         </tr>
258
259       </table>
260     </td>
261   </tr>
262 </table>
263 <table cellspacing=5 cellpadding=0 border=0>
264   <tr>
265     <td>
266       &nbsp;
267     </td>
268     <td>
269
270 <p>
271 Called whenever a user types /INFO.
272 <p>
273 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>
274 :information here
275 <p>
276 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>.
277 <p>
278 <div class="fragment"><pre>00122 { };
279 </pre></div>    </td>
280   </tr>
281 </table>
282 <a name="a13" doxytag="Module::OnOper"></a><p>
283 <table width="100%" cellpadding="2" cellspacing="0" border="0">
284   <tr>
285     <td class="md">
286       <table cellpadding="0" cellspacing="0" border="0">
287         <tr>
288           <td class="md" nowrap valign="top"> void Module::OnOper </td>
289           <td class="md" valign="top">(&nbsp;</td>
290           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
291           <td class="mdname1" valign="top" nowrap>&nbsp; <em>user</em>          </td>
292           <td class="md" valign="top">)&nbsp;</td>
293           <td class="md" nowrap><code> [virtual]</code></td>
294         </tr>
295
296       </table>
297     </td>
298   </tr>
299 </table>
300 <table cellspacing=5 cellpadding=0 border=0>
301   <tr>
302     <td>
303       &nbsp;
304     </td>
305     <td>
306
307 <p>
308 Called whenever a user opers locally.
309 <p>
310 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.
311 <p>
312 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>.
313 <p>
314 <div class="fragment"><pre>00121 { };
315 </pre></div>    </td>
316   </tr>
317 </table>
318 <a name="a8" doxytag="Module::OnPacketReceive"></a><p>
319 <table width="100%" cellpadding="2" cellspacing="0" border="0">
320   <tr>
321     <td class="md">
322       <table cellpadding="0" cellspacing="0" border="0">
323         <tr>
324           <td class="md" nowrap valign="top"> void Module::OnPacketReceive </td>
325           <td class="md" valign="top">(&nbsp;</td>
326           <td class="md" nowrap valign="top">char *&nbsp;</td>
327           <td class="mdname1" valign="top" nowrap>&nbsp; <em>p</em>          </td>
328           <td class="md" valign="top">)&nbsp;</td>
329           <td class="md" nowrap><code> [virtual]</code></td>
330         </tr>
331
332       </table>
333     </td>
334   </tr>
335 </table>
336 <table cellspacing=5 cellpadding=0 border=0>
337   <tr>
338     <td>
339       &nbsp;
340     </td>
341     <td>
342
343 <p>
344 Called after a packet is received from another irc server.
345 <p>
346 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.
347 <p>
348 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>.
349 <p>
350 <div class="fragment"><pre>00115 { }
351 </pre></div>    </td>
352   </tr>
353 </table>
354 <a name="a7" doxytag="Module::OnPacketTransmit"></a><p>
355 <table width="100%" cellpadding="2" cellspacing="0" border="0">
356   <tr>
357     <td class="md">
358       <table cellpadding="0" cellspacing="0" border="0">
359         <tr>
360           <td class="md" nowrap valign="top"> void Module::OnPacketTransmit </td>
361           <td class="md" valign="top">(&nbsp;</td>
362           <td class="md" nowrap valign="top">char *&nbsp;</td>
363           <td class="mdname1" valign="top" nowrap>&nbsp; <em>p</em>          </td>
364           <td class="md" valign="top">)&nbsp;</td>
365           <td class="md" nowrap><code> [virtual]</code></td>
366         </tr>
367
368       </table>
369     </td>
370   </tr>
371 </table>
372 <table cellspacing=5 cellpadding=0 border=0>
373   <tr>
374     <td>
375       &nbsp;
376     </td>
377     <td>
378
379 <p>
380 Called before a packet is transmitted across the irc network between two irc servers.
381 <p>
382 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.
383 <p>
384 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>.
385 <p>
386 <div class="fragment"><pre>00114 { }
387 </pre></div>    </td>
388   </tr>
389 </table>
390 <a name="a9" doxytag="Module::OnRehash"></a><p>
391 <table width="100%" cellpadding="2" cellspacing="0" border="0">
392   <tr>
393     <td class="md">
394       <table cellpadding="0" cellspacing="0" border="0">
395         <tr>
396           <td class="md" nowrap valign="top"> void Module::OnRehash </td>
397           <td class="md" valign="top">(&nbsp;</td>
398           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
399           <td class="md" valign="top">)&nbsp;</td>
400           <td class="md" nowrap><code> [virtual]</code></td>
401         </tr>
402
403       </table>
404     </td>
405   </tr>
406 </table>
407 <table cellspacing=5 cellpadding=0 border=0>
408   <tr>
409     <td>
410       &nbsp;
411     </td>
412     <td>
413
414 <p>
415 Called on rehash.
416 <p>
417 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.
418 <p>
419 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>.
420 <p>
421 <div class="fragment"><pre>00116 { }
422 </pre></div>    </td>
423   </tr>
424 </table>
425 <a name="a10" doxytag="Module::OnServerRaw"></a><p>
426 <table width="100%" cellpadding="2" cellspacing="0" border="0">
427   <tr>
428     <td class="md">
429       <table cellpadding="0" cellspacing="0" border="0">
430         <tr>
431           <td class="md" nowrap valign="top"> void Module::OnServerRaw </td>
432           <td class="md" valign="top">(&nbsp;</td>
433           <td class="md" nowrap valign="top">std::string &amp;&nbsp;</td>
434           <td class="mdname" nowrap>&nbsp; <em>raw</em>, </td>
435         </tr>
436         <tr>
437           <td></td>
438           <td></td>
439           <td class="md" nowrap>bool&nbsp;</td>
440           <td class="mdname" nowrap>&nbsp; <em>inbound</em></td>
441         </tr>
442         <tr>
443           <td></td>
444           <td class="md">)&nbsp;</td>
445           <td class="md" colspan="2"><code> [virtual]</code></td>
446         </tr>
447
448       </table>
449     </td>
450   </tr>
451 </table>
452 <table cellspacing=5 cellpadding=0 border=0>
453   <tr>
454     <td>
455       &nbsp;
456     </td>
457     <td>
458
459 <p>
460 Called when a raw command is transmitted or received.
461 <p>
462 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.
463 <p>
464 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>.
465 <p>
466 <div class="fragment"><pre>00117 { }
467 </pre></div>    </td>
468   </tr>
469 </table>
470 <a name="a3" doxytag="Module::OnUserConnect"></a><p>
471 <table width="100%" cellpadding="2" cellspacing="0" border="0">
472   <tr>
473     <td class="md">
474       <table cellpadding="0" cellspacing="0" border="0">
475         <tr>
476           <td class="md" nowrap valign="top"> void Module::OnUserConnect </td>
477           <td class="md" valign="top">(&nbsp;</td>
478           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
479           <td class="mdname1" valign="top" nowrap>&nbsp; <em>user</em>          </td>
480           <td class="md" valign="top">)&nbsp;</td>
481           <td class="md" nowrap><code> [virtual]</code></td>
482         </tr>
483
484       </table>
485     </td>
486   </tr>
487 </table>
488 <table cellspacing=5 cellpadding=0 border=0>
489   <tr>
490     <td>
491       &nbsp;
492     </td>
493     <td>
494
495 <p>
496 Called when a user connects.
497 <p>
498 The details of the connecting user are available to you in the parameter userrec *user
499 <p>
500 Definition at line <a class="el" href="modules_8cpp-source.html#l00110">110</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
501 <p>
502 <div class="fragment"><pre>00110 { }
503 </pre></div>    </td>
504   </tr>
505 </table>
506 <a name="a5" doxytag="Module::OnUserJoin"></a><p>
507 <table width="100%" cellpadding="2" cellspacing="0" border="0">
508   <tr>
509     <td class="md">
510       <table cellpadding="0" cellspacing="0" border="0">
511         <tr>
512           <td class="md" nowrap valign="top"> void Module::OnUserJoin </td>
513           <td class="md" valign="top">(&nbsp;</td>
514           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
515           <td class="mdname" nowrap>&nbsp; <em>user</em>, </td>
516         </tr>
517         <tr>
518           <td></td>
519           <td></td>
520           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
521           <td class="mdname" nowrap>&nbsp; <em>channel</em></td>
522         </tr>
523         <tr>
524           <td></td>
525           <td class="md">)&nbsp;</td>
526           <td class="md" colspan="2"><code> [virtual]</code></td>
527         </tr>
528
529       </table>
530     </td>
531   </tr>
532 </table>
533 <table cellspacing=5 cellpadding=0 border=0>
534   <tr>
535     <td>
536       &nbsp;
537     </td>
538     <td>
539
540 <p>
541 Called when a user joins a channel.
542 <p>
543 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
544 <p>
545 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>.
546 <p>
547 <div class="fragment"><pre>00112 { }
548 </pre></div>    </td>
549   </tr>
550 </table>
551 <a name="a6" doxytag="Module::OnUserPart"></a><p>
552 <table width="100%" cellpadding="2" cellspacing="0" border="0">
553   <tr>
554     <td class="md">
555       <table cellpadding="0" cellspacing="0" border="0">
556         <tr>
557           <td class="md" nowrap valign="top"> void Module::OnUserPart </td>
558           <td class="md" valign="top">(&nbsp;</td>
559           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
560           <td class="mdname" nowrap>&nbsp; <em>user</em>, </td>
561         </tr>
562         <tr>
563           <td></td>
564           <td></td>
565           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
566           <td class="mdname" nowrap>&nbsp; <em>channel</em></td>
567         </tr>
568         <tr>
569           <td></td>
570           <td class="md">)&nbsp;</td>
571           <td class="md" colspan="2"><code> [virtual]</code></td>
572         </tr>
573
574       </table>
575     </td>
576   </tr>
577 </table>
578 <table cellspacing=5 cellpadding=0 border=0>
579   <tr>
580     <td>
581       &nbsp;
582     </td>
583     <td>
584
585 <p>
586 Called when a user parts a channel.
587 <p>
588 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
589 <p>
590 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>.
591 <p>
592 <div class="fragment"><pre>00113 { }
593 </pre></div>    </td>
594   </tr>
595 </table>
596 <a name="a12" doxytag="Module::OnUserPreJoin"></a><p>
597 <table width="100%" cellpadding="2" cellspacing="0" border="0">
598   <tr>
599     <td class="md">
600       <table cellpadding="0" cellspacing="0" border="0">
601         <tr>
602           <td class="md" nowrap valign="top"> int Module::OnUserPreJoin </td>
603           <td class="md" valign="top">(&nbsp;</td>
604           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
605           <td class="mdname" nowrap>&nbsp; <em>user</em>, </td>
606         </tr>
607         <tr>
608           <td></td>
609           <td></td>
610           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
611           <td class="mdname" nowrap>&nbsp; <em>chan</em>, </td>
612         </tr>
613         <tr>
614           <td></td>
615           <td></td>
616           <td class="md" nowrap>const char *&nbsp;</td>
617           <td class="mdname" nowrap>&nbsp; <em>cname</em></td>
618         </tr>
619         <tr>
620           <td></td>
621           <td class="md">)&nbsp;</td>
622           <td class="md" colspan="2"><code> [virtual]</code></td>
623         </tr>
624
625       </table>
626     </td>
627   </tr>
628 </table>
629 <table cellspacing=5 cellpadding=0 border=0>
630   <tr>
631     <td>
632       &nbsp;
633     </td>
634     <td>
635
636 <p>
637 Called whenever a user is about to join a channel, before any processing is done.
638 <p>
639 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>
640 IMPORTANT NOTE!<p>
641 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.
642 <p>
643 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>.
644 <p>
645 <div class="fragment"><pre>00118 { <span class="keywordflow">return</span> 0; }
646 </pre></div>    </td>
647   </tr>
648 </table>
649 <a name="a16" doxytag="Module::OnUserPreMessage"></a><p>
650 <table width="100%" cellpadding="2" cellspacing="0" border="0">
651   <tr>
652     <td class="md">
653       <table cellpadding="0" cellspacing="0" border="0">
654         <tr>
655           <td class="md" nowrap valign="top"> int Module::OnUserPreMessage </td>
656           <td class="md" valign="top">(&nbsp;</td>
657           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
658           <td class="mdname" nowrap>&nbsp; <em>user</em>, </td>
659         </tr>
660         <tr>
661           <td></td>
662           <td></td>
663           <td class="md" nowrap>void *&nbsp;</td>
664           <td class="mdname" nowrap>&nbsp; <em>dest</em>, </td>
665         </tr>
666         <tr>
667           <td></td>
668           <td></td>
669           <td class="md" nowrap>int&nbsp;</td>
670           <td class="mdname" nowrap>&nbsp; <em>target_type</em>, </td>
671         </tr>
672         <tr>
673           <td></td>
674           <td></td>
675           <td class="md" nowrap>std::string&nbsp;</td>
676           <td class="mdname" nowrap>&nbsp; <em>text</em></td>
677         </tr>
678         <tr>
679           <td></td>
680           <td class="md">)&nbsp;</td>
681           <td class="md" colspan="2"><code> [virtual]</code></td>
682         </tr>
683
684       </table>
685     </td>
686   </tr>
687 </table>
688 <table cellspacing=5 cellpadding=0 border=0>
689   <tr>
690     <td>
691       &nbsp;
692     </td>
693     <td>
694
695 <p>
696 Called whenever a user is about to PRIVMSG A user or a channel, before any processing is done.
697 <p>
698 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.
699 <p>
700 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>.
701 <p>
702 <div class="fragment"><pre>00124 { <span class="keywordflow">return</span> 0; };
703 </pre></div>    </td>
704   </tr>
705 </table>
706 <a name="a17" doxytag="Module::OnUserPreNotice"></a><p>
707 <table width="100%" cellpadding="2" cellspacing="0" border="0">
708   <tr>
709     <td class="md">
710       <table cellpadding="0" cellspacing="0" border="0">
711         <tr>
712           <td class="md" nowrap valign="top"> int Module::OnUserPreNotice </td>
713           <td class="md" valign="top">(&nbsp;</td>
714           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
715           <td class="mdname" nowrap>&nbsp; <em>user</em>, </td>
716         </tr>
717         <tr>
718           <td></td>
719           <td></td>
720           <td class="md" nowrap>void *&nbsp;</td>
721           <td class="mdname" nowrap>&nbsp; <em>dest</em>, </td>
722         </tr>
723         <tr>
724           <td></td>
725           <td></td>
726           <td class="md" nowrap>int&nbsp;</td>
727           <td class="mdname" nowrap>&nbsp; <em>target_type</em>, </td>
728         </tr>
729         <tr>
730           <td></td>
731           <td></td>
732           <td class="md" nowrap>std::string&nbsp;</td>
733           <td class="mdname" nowrap>&nbsp; <em>text</em></td>
734         </tr>
735         <tr>
736           <td></td>
737           <td class="md">)&nbsp;</td>
738           <td class="md" colspan="2"><code> [virtual]</code></td>
739         </tr>
740
741       </table>
742     </td>
743   </tr>
744 </table>
745 <table cellspacing=5 cellpadding=0 border=0>
746   <tr>
747     <td>
748       &nbsp;
749     </td>
750     <td>
751
752 <p>
753 Called whenever a user is about to NOTICE A user or a channel, before any processing is done.
754 <p>
755 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.
756 <p>
757 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>.
758 <p>
759 <div class="fragment"><pre>00125 { <span class="keywordflow">return</span> 0; };
760 </pre></div>    </td>
761   </tr>
762 </table>
763 <a name="a4" doxytag="Module::OnUserQuit"></a><p>
764 <table width="100%" cellpadding="2" cellspacing="0" border="0">
765   <tr>
766     <td class="md">
767       <table cellpadding="0" cellspacing="0" border="0">
768         <tr>
769           <td class="md" nowrap valign="top"> void Module::OnUserQuit </td>
770           <td class="md" valign="top">(&nbsp;</td>
771           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
772           <td class="mdname1" valign="top" nowrap>&nbsp; <em>user</em>          </td>
773           <td class="md" valign="top">)&nbsp;</td>
774           <td class="md" nowrap><code> [virtual]</code></td>
775         </tr>
776
777       </table>
778     </td>
779   </tr>
780 </table>
781 <table cellspacing=5 cellpadding=0 border=0>
782   <tr>
783     <td>
784       &nbsp;
785     </td>
786     <td>
787
788 <p>
789 Called when a user quits.
790 <p>
791 The details of the exiting user are available to you in the parameter userrec *user
792 <p>
793 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>.
794 <p>
795 <div class="fragment"><pre>00111 { }
796 </pre></div>    </td>
797   </tr>
798 </table>
799 <a name="a15" doxytag="Module::OnWhois"></a><p>
800 <table width="100%" cellpadding="2" cellspacing="0" border="0">
801   <tr>
802     <td class="md">
803       <table cellpadding="0" cellspacing="0" border="0">
804         <tr>
805           <td class="md" nowrap valign="top"> void Module::OnWhois </td>
806           <td class="md" valign="top">(&nbsp;</td>
807           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
808           <td class="mdname" nowrap>&nbsp; <em>source</em>, </td>
809         </tr>
810         <tr>
811           <td></td>
812           <td></td>
813           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
814           <td class="mdname" nowrap>&nbsp; <em>dest</em></td>
815         </tr>
816         <tr>
817           <td></td>
818           <td class="md">)&nbsp;</td>
819           <td class="md" colspan="2"><code> [virtual]</code></td>
820         </tr>
821
822       </table>
823     </td>
824   </tr>
825 </table>
826 <table cellspacing=5 cellpadding=0 border=0>
827   <tr>
828     <td>
829       &nbsp;
830     </td>
831     <td>
832
833 <p>
834 Called whenever a /WHOIS is performed on a local user.
835 <p>
836 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.
837 <p>
838 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>.
839 <p>
840 <div class="fragment"><pre>00123 { };
841 </pre></div>    </td>
842   </tr>
843 </table>
844 <hr>The documentation for this class was generated from the following files:<ul>
845 <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>
846 <hr><address style="align: right;"><small>Generated on Thu Apr 8 19:13:11 2004 for InspIRCd by
847 <a href="http://www.doxygen.org/index.html">
848 <img src="doxygen.png" alt="doxygen" align="middle" border=0 
849 width=110 height=53></a>1.3-rc3 </small></address>
850 </body>
851 </html>