]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/classModule.html
Updated docs
[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="doxygen.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="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">Module::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">Module::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">Module::OnServerRaw</a> (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 </table>
48 <hr><a name="_details"></a><h2>Detailed Description</h2>
49 Base class for all InspIRCd modules This class is the base class for InspIRCd modules.
50 <p>
51 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. 
52 <p>
53
54 <p>
55 Definition at line <a class="el" href="modules_8h-source.html#l00065">65</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
56 <a name="a0" doxytag="Module::Module"></a><p>
57 <table width="100%" cellpadding="2" cellspacing="0" border="0">
58   <tr>
59     <td class="md">
60       <table cellpadding="0" cellspacing="0" border="0">
61         <tr>
62           <td class="md" nowrap valign="top"> Module::Module </td>
63           <td class="md" valign="top">(&nbsp;</td>
64           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
65           <td class="md" valign="top">)&nbsp;</td>
66           <td class="md" nowrap></td>
67         </tr>
68
69       </table>
70     </td>
71   </tr>
72 </table>
73 <table cellspacing=5 cellpadding=0 border=0>
74   <tr>
75     <td>
76       &nbsp;
77     </td>
78     <td>
79
80 <p>
81 Default constructor creates a module class.
82 <p>
83
84 <p>
85 Definition at line <a class="el" href="modules_8cpp-source.html#l00027">27</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
86 <p>
87 <div class="fragment"><pre>00027 { }
88 </pre></div>    </td>
89   </tr>
90 </table>
91 <a name="a1" doxytag="Module::~Module"></a><p>
92 <table width="100%" cellpadding="2" cellspacing="0" border="0">
93   <tr>
94     <td class="md">
95       <table cellpadding="0" cellspacing="0" border="0">
96         <tr>
97           <td class="md" nowrap valign="top"> Module::~Module </td>
98           <td class="md" valign="top">(&nbsp;</td>
99           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
100           <td class="md" valign="top">)&nbsp;</td>
101           <td class="md" nowrap><code> [virtual]</code></td>
102         </tr>
103
104       </table>
105     </td>
106   </tr>
107 </table>
108 <table cellspacing=5 cellpadding=0 border=0>
109   <tr>
110     <td>
111       &nbsp;
112     </td>
113     <td>
114
115 <p>
116 Default destructor destroys a module class.
117 <p>
118
119 <p>
120 Definition at line <a class="el" href="modules_8cpp-source.html#l00028">28</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
121 <p>
122 <div class="fragment"><pre>00028 { }
123 </pre></div>    </td>
124   </tr>
125 </table>
126 <hr><h2>Member Function Documentation</h2>
127 <a name="a2" doxytag="Module::GetVersion"></a><p>
128 <table width="100%" cellpadding="2" cellspacing="0" border="0">
129   <tr>
130     <td class="md">
131       <table cellpadding="0" cellspacing="0" border="0">
132         <tr>
133           <td class="md" nowrap valign="top"> <a class="el" href="classVersion.html">Version</a> Module::GetVersion </td>
134           <td class="md" valign="top">(&nbsp;</td>
135           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
136           <td class="md" valign="top">)&nbsp;</td>
137           <td class="md" nowrap><code> [virtual]</code></td>
138         </tr>
139
140       </table>
141     </td>
142   </tr>
143 </table>
144 <table cellspacing=5 cellpadding=0 border=0>
145   <tr>
146     <td>
147       &nbsp;
148     </td>
149     <td>
150
151 <p>
152 Returns the version number of a Module.
153 <p>
154 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>
155 <p>
156 Definition at line <a class="el" href="modules_8cpp-source.html#l00037">37</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
157 <p>
158 <div class="fragment"><pre>00037 { <span class="keywordflow">return</span> <a class="code" href="classVersion.html">Version</a>(1,0,0,0); }
159 </pre></div>    </td>
160   </tr>
161 </table>
162 <a name="a8" doxytag="Module::Module::OnPacketReceive"></a><p>
163 <table width="100%" cellpadding="2" cellspacing="0" border="0">
164   <tr>
165     <td class="md">
166       <table cellpadding="0" cellspacing="0" border="0">
167         <tr>
168           <td class="md" nowrap valign="top"> virtual void Module::Module::OnPacketReceive </td>
169           <td class="md" valign="top">(&nbsp;</td>
170           <td class="md" nowrap valign="top">char *&nbsp;</td>
171           <td class="mdname1" valign="top" nowrap>&nbsp; <em>p</em>          </td>
172           <td class="md" valign="top">)&nbsp;</td>
173           <td class="md" nowrap><code> [virtual]</code></td>
174         </tr>
175
176       </table>
177     </td>
178   </tr>
179 </table>
180 <table cellspacing=5 cellpadding=0 border=0>
181   <tr>
182     <td>
183       &nbsp;
184     </td>
185     <td>
186
187 <p>
188 Called after a packet is received from another irc server.
189 <p>
190 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.    </td>
191   </tr>
192 </table>
193 <a name="a7" doxytag="Module::Module::OnPacketTransmit"></a><p>
194 <table width="100%" cellpadding="2" cellspacing="0" border="0">
195   <tr>
196     <td class="md">
197       <table cellpadding="0" cellspacing="0" border="0">
198         <tr>
199           <td class="md" nowrap valign="top"> virtual void Module::Module::OnPacketTransmit </td>
200           <td class="md" valign="top">(&nbsp;</td>
201           <td class="md" nowrap valign="top">char *&nbsp;</td>
202           <td class="mdname1" valign="top" nowrap>&nbsp; <em>p</em>          </td>
203           <td class="md" valign="top">)&nbsp;</td>
204           <td class="md" nowrap><code> [virtual]</code></td>
205         </tr>
206
207       </table>
208     </td>
209   </tr>
210 </table>
211 <table cellspacing=5 cellpadding=0 border=0>
212   <tr>
213     <td>
214       &nbsp;
215     </td>
216     <td>
217
218 <p>
219 Called before a packet is transmitted across the irc network between two irc servers.
220 <p>
221 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.    </td>
222   </tr>
223 </table>
224 <a name="a10" doxytag="Module::Module::OnServerRaw"></a><p>
225 <table width="100%" cellpadding="2" cellspacing="0" border="0">
226   <tr>
227     <td class="md">
228       <table cellpadding="0" cellspacing="0" border="0">
229         <tr>
230           <td class="md" nowrap valign="top"> virtual void Module::Module::OnServerRaw </td>
231           <td class="md" valign="top">(&nbsp;</td>
232           <td class="md" nowrap valign="top">string &amp;&nbsp;</td>
233           <td class="mdname" nowrap>&nbsp; <em>raw</em>, </td>
234         </tr>
235         <tr>
236           <td></td>
237           <td></td>
238           <td class="md" nowrap>bool&nbsp;</td>
239           <td class="mdname" nowrap>&nbsp; <em>inbound</em></td>
240         </tr>
241         <tr>
242           <td></td>
243           <td class="md">)&nbsp;</td>
244           <td class="md" colspan="2"><code> [virtual]</code></td>
245         </tr>
246
247       </table>
248     </td>
249   </tr>
250 </table>
251 <table cellspacing=5 cellpadding=0 border=0>
252   <tr>
253     <td>
254       &nbsp;
255     </td>
256     <td>
257
258 <p>
259 Called when a raw command is transmitted or received.
260 <p>
261 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.    </td>
262   </tr>
263 </table>
264 <a name="a9" doxytag="Module::OnRehash"></a><p>
265 <table width="100%" cellpadding="2" cellspacing="0" border="0">
266   <tr>
267     <td class="md">
268       <table cellpadding="0" cellspacing="0" border="0">
269         <tr>
270           <td class="md" nowrap valign="top"> void Module::OnRehash </td>
271           <td class="md" valign="top">(&nbsp;</td>
272           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
273           <td class="md" valign="top">)&nbsp;</td>
274           <td class="md" nowrap><code> [virtual]</code></td>
275         </tr>
276
277       </table>
278     </td>
279   </tr>
280 </table>
281 <table cellspacing=5 cellpadding=0 border=0>
282   <tr>
283     <td>
284       &nbsp;
285     </td>
286     <td>
287
288 <p>
289 Called on rehash.
290 <p>
291 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.
292 <p>
293 Definition at line <a class="el" href="modules_8cpp-source.html#l00035">35</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
294 <p>
295 <div class="fragment"><pre>00035 { }
296 </pre></div>    </td>
297   </tr>
298 </table>
299 <a name="a3" doxytag="Module::OnUserConnect"></a><p>
300 <table width="100%" cellpadding="2" cellspacing="0" border="0">
301   <tr>
302     <td class="md">
303       <table cellpadding="0" cellspacing="0" border="0">
304         <tr>
305           <td class="md" nowrap valign="top"> void Module::OnUserConnect </td>
306           <td class="md" valign="top">(&nbsp;</td>
307           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
308           <td class="mdname1" valign="top" nowrap>&nbsp; <em>user</em>          </td>
309           <td class="md" valign="top">)&nbsp;</td>
310           <td class="md" nowrap><code> [virtual]</code></td>
311         </tr>
312
313       </table>
314     </td>
315   </tr>
316 </table>
317 <table cellspacing=5 cellpadding=0 border=0>
318   <tr>
319     <td>
320       &nbsp;
321     </td>
322     <td>
323
324 <p>
325 Called when a user connects.
326 <p>
327 The details of the connecting user are available to you in the parameter userrec *user
328 <p>
329 Definition at line <a class="el" href="modules_8cpp-source.html#l00029">29</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
330 <p>
331 <div class="fragment"><pre>00029 { }
332 </pre></div>    </td>
333   </tr>
334 </table>
335 <a name="a5" doxytag="Module::OnUserJoin"></a><p>
336 <table width="100%" cellpadding="2" cellspacing="0" border="0">
337   <tr>
338     <td class="md">
339       <table cellpadding="0" cellspacing="0" border="0">
340         <tr>
341           <td class="md" nowrap valign="top"> void Module::OnUserJoin </td>
342           <td class="md" valign="top">(&nbsp;</td>
343           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
344           <td class="mdname" nowrap>&nbsp; <em>user</em>, </td>
345         </tr>
346         <tr>
347           <td></td>
348           <td></td>
349           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
350           <td class="mdname" nowrap>&nbsp; <em>channel</em></td>
351         </tr>
352         <tr>
353           <td></td>
354           <td class="md">)&nbsp;</td>
355           <td class="md" colspan="2"><code> [virtual]</code></td>
356         </tr>
357
358       </table>
359     </td>
360   </tr>
361 </table>
362 <table cellspacing=5 cellpadding=0 border=0>
363   <tr>
364     <td>
365       &nbsp;
366     </td>
367     <td>
368
369 <p>
370 Called when a user joins a channel.
371 <p>
372 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
373 <p>
374 Definition at line <a class="el" href="modules_8cpp-source.html#l00031">31</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
375 <p>
376 <div class="fragment"><pre>00031 { }
377 </pre></div>    </td>
378   </tr>
379 </table>
380 <a name="a6" doxytag="Module::OnUserPart"></a><p>
381 <table width="100%" cellpadding="2" cellspacing="0" border="0">
382   <tr>
383     <td class="md">
384       <table cellpadding="0" cellspacing="0" border="0">
385         <tr>
386           <td class="md" nowrap valign="top"> void Module::OnUserPart </td>
387           <td class="md" valign="top">(&nbsp;</td>
388           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
389           <td class="mdname" nowrap>&nbsp; <em>user</em>, </td>
390         </tr>
391         <tr>
392           <td></td>
393           <td></td>
394           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
395           <td class="mdname" nowrap>&nbsp; <em>channel</em></td>
396         </tr>
397         <tr>
398           <td></td>
399           <td class="md">)&nbsp;</td>
400           <td class="md" colspan="2"><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 when a user parts a channel.
416 <p>
417 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
418 <p>
419 Definition at line <a class="el" href="modules_8cpp-source.html#l00032">32</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
420 <p>
421 <div class="fragment"><pre>00032 { }
422 </pre></div>    </td>
423   </tr>
424 </table>
425 <a name="a4" doxytag="Module::OnUserQuit"></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::OnUserQuit </td>
432           <td class="md" valign="top">(&nbsp;</td>
433           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
434           <td class="mdname1" valign="top" nowrap>&nbsp; <em>user</em>          </td>
435           <td class="md" valign="top">)&nbsp;</td>
436           <td class="md" nowrap><code> [virtual]</code></td>
437         </tr>
438
439       </table>
440     </td>
441   </tr>
442 </table>
443 <table cellspacing=5 cellpadding=0 border=0>
444   <tr>
445     <td>
446       &nbsp;
447     </td>
448     <td>
449
450 <p>
451 Called when a user quits.
452 <p>
453 The details of the exiting user are available to you in the parameter userrec *user
454 <p>
455 Definition at line <a class="el" href="modules_8cpp-source.html#l00030">30</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
456 <p>
457 <div class="fragment"><pre>00030 { }
458 </pre></div>    </td>
459   </tr>
460 </table>
461 <hr>The documentation for this class was generated from the following files:<ul>
462 <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>
463 <hr><address style="align: right;"><small>Generated on Sun Mar 30 19:36:13 2003 for InspIRCd by
464 <a href="http://www.doxygen.org/index.html">
465 <img src="doxygen.png" alt="doxygen" align="middle" border=0 
466 width=110 height=53></a>1.3-rc3 </small></address>
467 </body>
468 </html>