]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/classModule.html
Added DNS class to documentation
[user/henk/code/inspircd.git] / docs / module-doc / classModule.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3 <title>InspIRCd: Module class Reference</title>
4 <link href="inspircd.css" rel="stylesheet" type="text/css">
5 </head><body>
6 <!-- Generated by Doxygen 1.3.3 -->
7 <div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Compound&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Compound&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
8 <h1>Module Class Reference</h1>Base class for all InspIRCd modules This class is the base class for InspIRCd modules.  
9 <a href="#_details">More...</a>
10 <p>
11 <code>#include &lt;<a class="el" href="modules_8h-source.html">modules.h</a>&gt;</code>
12 <p>
13 Inherits <a class="el" href="classclassbase.html">classbase</a>.
14 <p>
15 <a href="classModule-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
16 <tr><td></td></tr>
17 <tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
18 <tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a0">Module</a> ()</td></tr>
19
20 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor creates a module class. </em> <a href="#a0"></a><em><br><br></td></tr>
21 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a1">~Module</a> ()</td></tr>
22
23 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default destructor destroys a module class. </em> <a href="#a1"></a><em><br><br></td></tr>
24 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="classVersion.html">Version</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a2">GetVersion</a> ()</td></tr>
25
26 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the version number of a Module. </em> <a href="#a2"></a><em><br><br></td></tr>
27 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a3">OnUserConnect</a> (<a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
28
29 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called when a user connects. </em> <a href="#a3"></a><em><br><br></td></tr>
30 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a4">OnUserQuit</a> (<a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
31
32 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called when a user quits. </em> <a href="#a4"></a><em><br><br></td></tr>
33 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" 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>
34
35 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called when a user joins a channel. </em> <a href="#a5"></a><em><br><br></td></tr>
36 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" 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>
37
38 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called when a user parts a channel. </em> <a href="#a6"></a><em><br><br></td></tr>
39 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a7">OnPacketTransmit</a> (char *p)</td></tr>
40
41 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called before a packet is transmitted across the irc network between two irc servers. </em> <a href="#a7"></a><em><br><br></td></tr>
42 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a8">OnPacketReceive</a> (char *p)</td></tr>
43
44 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called after a packet is received from another irc server. </em> <a href="#a8"></a><em><br><br></td></tr>
45 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a9">OnRehash</a> ()</td></tr>
46
47 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called on rehash. </em> <a href="#a9"></a><em><br><br></td></tr>
48 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a10">OnServerRaw</a> (std::string &amp;raw, bool inbound, <a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
49
50 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called when a raw command is transmitted or received. </em> <a href="#a10"></a><em><br><br></td></tr>
51 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual int&nbsp;</td><td class="memItemRight" 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#a27">string_list</a> &amp;params)</td></tr>
52
53 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called whenever an extended mode is to be processed. </em> <a href="#a11"></a><em><br><br></td></tr>
54 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual int&nbsp;</td><td class="memItemRight" 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>
55
56 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called whenever a user is about to join a channel, before any processing is done. </em> <a href="#a12"></a><em><br><br></td></tr>
57 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a13">OnOper</a> (<a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
58
59 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called whenever a user opers locally. </em> <a href="#a13"></a><em><br><br></td></tr>
60 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a14">OnInfo</a> (<a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
61
62 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called whenever a user types /INFO. </em> <a href="#a14"></a><em><br><br></td></tr>
63 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" 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>
64
65 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called whenever a /WHOIS is performed on a local user. </em> <a href="#a15"></a><em><br><br></td></tr>
66 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a16">OnUserPreInvite</a> (<a class="el" href="classuserrec.html">userrec</a> *source, <a class="el" href="classuserrec.html">userrec</a> *dest, <a class="el" href="classchanrec.html">chanrec</a> *channel)</td></tr>
67
68 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called whenever a user is about to invite another user into a channel, before any processing is done. </em> <a href="#a16"></a><em><br><br></td></tr>
69 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a17">OnUserPreMessage</a> (<a class="el" href="classuserrec.html">userrec</a> *user, void *dest, int target_type, std::string &amp;text)</td></tr>
70
71 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called whenever a user is about to PRIVMSG A user or a channel, before any processing is done. </em> <a href="#a17"></a><em><br><br></td></tr>
72 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a18">OnUserPreNotice</a> (<a class="el" href="classuserrec.html">userrec</a> *user, void *dest, int target_type, std::string &amp;text)</td></tr>
73
74 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called whenever a user is about to NOTICE A user or a channel, before any processing is done. </em> <a href="#a18"></a><em><br><br></td></tr>
75 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a19">OnUserPreNick</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string newnick)</td></tr>
76
77 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called before any nickchange, local or remote. </em> <a href="#a19"></a><em><br><br></td></tr>
78 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a20">OnAccessCheck</a> (<a class="el" href="classuserrec.html">userrec</a> *source, <a class="el" href="classuserrec.html">userrec</a> *dest, <a class="el" href="classchanrec.html">chanrec</a> *channel, int access_type)</td></tr>
79
80 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called before an action which requires a channel privilage check. </em> <a href="#a20"></a><em><br><br></td></tr>
81 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="modules_8h.html#a27">string_list</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a21">OnUserSync</a> (<a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
82
83 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called during a netburst to sync user data. </em> <a href="#a21"></a><em><br><br></td></tr>
84 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="modules_8h.html#a27">string_list</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a22">OnChannelSync</a> (<a class="el" href="classchanrec.html">chanrec</a> *chan)</td></tr>
85
86 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called during a netburst to sync channel data. </em> <a href="#a22"></a><em><br><br></td></tr>
87 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a23">On005Numeric</a> (std::string &amp;output)</td></tr>
88
89 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called when a 005 numeric is about to be output. </em> <a href="#a23"></a><em><br><br></td></tr>
90 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a24">OnKill</a> (<a class="el" href="classuserrec.html">userrec</a> *source, <a class="el" href="classuserrec.html">userrec</a> *dest, std::string reason)</td></tr>
91
92 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called when a client is disconnected by KILL. </em> <a href="#a24"></a><em><br><br></td></tr>
93 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a25">OnLoadModule</a> (<a class="el" href="classModule.html">Module</a> *mod, std::string name)</td></tr>
94
95 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called whenever a module is loaded. </em> <a href="#a25"></a><em><br><br></td></tr>
96 </table>
97 <hr><a name="_details"></a><h2>Detailed Description</h2>
98 Base class for all InspIRCd modules This class is the base class for InspIRCd modules. 
99 <p>
100 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. 
101 <p>
102
103 <p>
104 Definition at line <a class="el" href="modules_8h-source.html#l00126">126</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
105 <a name="a0" doxytag="Module::Module"></a><p>
106 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
107   <tr>
108     <td class="mdRow">
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>          </td>
114           <td class="md" valign="top">&nbsp;)&nbsp;</td>
115           <td class="md" nowrap></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 constructor creates a module class. 
131 <p>
132
133 <p>
134 Definition at line <a class="el" href="modules_8cpp-source.html#l00304">304</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
135 <p>
136 <div class="fragment"><pre>00304 { }
137 </pre></div>    </td>
138   </tr>
139 </table>
140 <a name="a1" doxytag="Module::~Module"></a><p>
141 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
142   <tr>
143     <td class="mdRow">
144       <table cellpadding="0" cellspacing="0" border="0">
145         <tr>
146           <td class="md" nowrap valign="top"> Module::~<a class="el" href="classModule.html">Module</a> </td>
147           <td class="md" valign="top">(&nbsp;</td>
148           <td class="mdname1" valign="top" nowrap>          </td>
149           <td class="md" valign="top">&nbsp;)&nbsp;</td>
150           <td class="md" nowrap><code> [virtual]</code></td>
151         </tr>
152
153       </table>
154     </td>
155   </tr>
156 </table>
157 <table cellspacing=5 cellpadding=0 border=0>
158   <tr>
159     <td>
160       &nbsp;
161     </td>
162     <td>
163
164 <p>
165 Default destructor destroys a module class. 
166 <p>
167
168 <p>
169 Definition at line <a class="el" href="modules_8cpp-source.html#l00305">305</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
170 <p>
171 <div class="fragment"><pre>00305 { }
172 </pre></div>    </td>
173   </tr>
174 </table>
175 <hr><h2>Member Function Documentation</h2>
176 <a name="a2" doxytag="Module::GetVersion"></a><p>
177 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
178   <tr>
179     <td class="mdRow">
180       <table cellpadding="0" cellspacing="0" border="0">
181         <tr>
182           <td class="md" nowrap valign="top"> <a class="el" href="classVersion.html">Version</a> Module::GetVersion </td>
183           <td class="md" valign="top">(&nbsp;</td>
184           <td class="mdname1" valign="top" nowrap>          </td>
185           <td class="md" valign="top">&nbsp;)&nbsp;</td>
186           <td class="md" nowrap><code> [virtual]</code></td>
187         </tr>
188
189       </table>
190     </td>
191   </tr>
192 </table>
193 <table cellspacing=5 cellpadding=0 border=0>
194   <tr>
195     <td>
196       &nbsp;
197     </td>
198     <td>
199
200 <p>
201 Returns the version number of a Module. 
202 <p>
203 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>
204 <p>
205 Definition at line <a class="el" href="modules_8cpp-source.html#l00316">316</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
206 <p>
207 <div class="fragment"><pre>00316 { <span class="keywordflow">return</span> <a class="code" href="classVersion.html">Version</a>(1,0,0,0); }
208 </pre></div>    </td>
209   </tr>
210 </table>
211 <a name="a23" doxytag="Module::On005Numeric"></a><p>
212 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
213   <tr>
214     <td class="mdRow">
215       <table cellpadding="0" cellspacing="0" border="0">
216         <tr>
217           <td class="md" nowrap valign="top"> void Module::On005Numeric </td>
218           <td class="md" valign="top">(&nbsp;</td>
219           <td class="md" nowrap valign="top">std::string &amp;&nbsp;</td>
220           <td class="mdname1" valign="top" nowrap> <em>output</em>          </td>
221           <td class="md" valign="top">&nbsp;)&nbsp;</td>
222           <td class="md" nowrap><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 when a 005 numeric is about to be output. 
238 <p>
239 The module should modify the 005 numeric if needed to indicate its features.
240 <p>
241 Definition at line <a class="el" href="modules_8cpp-source.html#l00327">327</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
242 <p>
243 <div class="fragment"><pre>00327 { };
244 </pre></div>    </td>
245   </tr>
246 </table>
247 <a name="a20" doxytag="Module::OnAccessCheck"></a><p>
248 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
249   <tr>
250     <td class="mdRow">
251       <table cellpadding="0" cellspacing="0" border="0">
252         <tr>
253           <td class="md" nowrap valign="top"> int Module::OnAccessCheck </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="mdname" nowrap> <em>source</em>, </td>
257         </tr>
258         <tr>
259           <td></td>
260           <td></td>
261           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
262           <td class="mdname" nowrap> <em>dest</em>, </td>
263         </tr>
264         <tr>
265           <td></td>
266           <td></td>
267           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
268           <td class="mdname" nowrap> <em>channel</em>, </td>
269         </tr>
270         <tr>
271           <td></td>
272           <td></td>
273           <td class="md" nowrap>int&nbsp;</td>
274           <td class="mdname" nowrap> <em>access_type</em></td>
275         </tr>
276         <tr>
277           <td></td>
278           <td class="md">)&nbsp;</td>
279           <td class="md" colspan="2"><code> [virtual]</code></td>
280         </tr>
281
282       </table>
283     </td>
284   </tr>
285 </table>
286 <table cellspacing=5 cellpadding=0 border=0>
287   <tr>
288     <td>
289       &nbsp;
290     </td>
291     <td>
292
293 <p>
294 Called before an action which requires a channel privilage check. 
295 <p>
296 This function is called before many functions which check a users status on a channel, for example before opping a user, deopping a user, kicking a user, etc. There are several values for access_type which indicate for what reason access is being checked. These are:<br>
297 <br>
298  AC_KICK (0) - A user is being kicked<br>
299  AC_DEOP (1) - a user is being deopped<br>
300  AC_OP (2) - a user is being opped<br>
301  AC_VOICE (3) - a user is being voiced<br>
302  AC_DEVOICE (4) - a user is being devoiced<br>
303  AC_HALFOP (5) - a user is being halfopped<br>
304  AC_DEHALFOP (6) - a user is being dehalfopped<br>
305  AC_INVITE (7) - a user is being invited<br>
306  AC_GENERAL_MODE (8) - a user channel mode is being changed<br>
307 <br>
308  Upon returning from your function you must return either ACR_DEFAULT, to indicate the module wishes to do nothing, or ACR_DENY where approprate to deny the action, and ACR_ALLOW where appropriate to allow the action. Please note that in the case of some access checks (such as AC_GENERAL_MODE) access may be denied 'upstream' causing other checks such as AC_DEOP to not be reached. Be very careful with use of the AC_GENERAL_MODE type, as it may inadvertently override the behaviour of other modules. When the access_type is AC_GENERAL_MODE, the destination of the mode will be NULL (as it has not yet been determined).
309 <p>
310 Definition at line <a class="el" href="modules_8cpp-source.html#l00324">324</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
311 <p>
312 References <a class="el" href="modules_8h-source.html#l00037">ACR_DEFAULT</a>.
313 <p>
314 <div class="fragment"><pre>00324 { <span class="keywordflow">return</span> <a class="code" href="modules_8h.html#a8">ACR_DEFAULT</a>; };
315 </pre></div>    </td>
316   </tr>
317 </table>
318 <a name="a22" doxytag="Module::OnChannelSync"></a><p>
319 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
320   <tr>
321     <td class="mdRow">
322       <table cellpadding="0" cellspacing="0" border="0">
323         <tr>
324           <td class="md" nowrap valign="top"> <a class="el" href="modules_8h.html#a27">string_list</a> Module::OnChannelSync </td>
325           <td class="md" valign="top">(&nbsp;</td>
326           <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
327           <td class="mdname1" valign="top" nowrap> <em>chan</em>          </td>
328           <td class="md" valign="top">&nbsp;)&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 during a netburst to sync channel data. 
345 <p>
346 This is called during the netburst on a per-channel basis. You should use this call to up any special channel-related things which are implemented by your module, e.g. sending listmodes. You may return multiple commands in the string_list.
347 <p>
348 Definition at line <a class="el" href="modules_8cpp-source.html#l00326">326</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
349 <p>
350 References <a class="el" href="modules_8h-source.html#l00061">string_list</a>.
351 <p>
352 <div class="fragment"><pre>00326 { <a class="code" href="modules_8h.html#a27">string_list</a> empty; <span class="keywordflow">return</span> empty; }
353 </pre></div>    </td>
354   </tr>
355 </table>
356 <a name="a11" doxytag="Module::OnExtendedMode"></a><p>
357 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
358   <tr>
359     <td class="mdRow">
360       <table cellpadding="0" cellspacing="0" border="0">
361         <tr>
362           <td class="md" nowrap valign="top"> int Module::OnExtendedMode </td>
363           <td class="md" valign="top">(&nbsp;</td>
364           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
365           <td class="mdname" nowrap> <em>user</em>, </td>
366         </tr>
367         <tr>
368           <td></td>
369           <td></td>
370           <td class="md" nowrap>void *&nbsp;</td>
371           <td class="mdname" nowrap> <em>target</em>, </td>
372         </tr>
373         <tr>
374           <td></td>
375           <td></td>
376           <td class="md" nowrap>char&nbsp;</td>
377           <td class="mdname" nowrap> <em>modechar</em>, </td>
378         </tr>
379         <tr>
380           <td></td>
381           <td></td>
382           <td class="md" nowrap>int&nbsp;</td>
383           <td class="mdname" nowrap> <em>type</em>, </td>
384         </tr>
385         <tr>
386           <td></td>
387           <td></td>
388           <td class="md" nowrap>bool&nbsp;</td>
389           <td class="mdname" nowrap> <em>mode_on</em>, </td>
390         </tr>
391         <tr>
392           <td></td>
393           <td></td>
394           <td class="md" nowrap><a class="el" href="modules_8h.html#a27">string_list</a> &amp;&nbsp;</td>
395           <td class="mdname" nowrap> <em>params</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 whenever an extended mode is to be processed. 
416 <p>
417 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#a21">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.
418 <p>
419 Definition at line <a class="el" href="modules_8cpp-source.html#l00315">315</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
420 <p>
421 <div class="fragment"><pre>00315 { <span class="keywordflow">return</span> <span class="keyword">false</span>; }
422 </pre></div>    </td>
423   </tr>
424 </table>
425 <a name="a14" doxytag="Module::OnInfo"></a><p>
426 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
427   <tr>
428     <td class="mdRow">
429       <table cellpadding="0" cellspacing="0" border="0">
430         <tr>
431           <td class="md" nowrap valign="top"> void Module::OnInfo </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> <em>user</em>          </td>
435           <td class="md" valign="top">&nbsp;)&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 whenever a user types /INFO. 
452 <p>
453 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>
454 &lt;nick&gt; :information here
455 <p>
456 Definition at line <a class="el" href="modules_8cpp-source.html#l00318">318</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
457 <p>
458 <div class="fragment"><pre>00318 { };
459 </pre></div>    </td>
460   </tr>
461 </table>
462 <a name="a24" doxytag="Module::OnKill"></a><p>
463 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
464   <tr>
465     <td class="mdRow">
466       <table cellpadding="0" cellspacing="0" border="0">
467         <tr>
468           <td class="md" nowrap valign="top"> int Module::OnKill </td>
469           <td class="md" valign="top">(&nbsp;</td>
470           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
471           <td class="mdname" nowrap> <em>source</em>, </td>
472         </tr>
473         <tr>
474           <td></td>
475           <td></td>
476           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
477           <td class="mdname" nowrap> <em>dest</em>, </td>
478         </tr>
479         <tr>
480           <td></td>
481           <td></td>
482           <td class="md" nowrap>std::string&nbsp;</td>
483           <td class="mdname" nowrap> <em>reason</em></td>
484         </tr>
485         <tr>
486           <td></td>
487           <td class="md">)&nbsp;</td>
488           <td class="md" colspan="2"><code> [virtual]</code></td>
489         </tr>
490
491       </table>
492     </td>
493   </tr>
494 </table>
495 <table cellspacing=5 cellpadding=0 border=0>
496   <tr>
497     <td>
498       &nbsp;
499     </td>
500     <td>
501
502 <p>
503 Called when a client is disconnected by KILL. 
504 <p>
505 If a client is killed by a server, e.g. a nickname collision or protocol error, source is NULL. Return 1 from this function to prevent the kill, and 0 from this function to allow it as normal. If you prevent the kill no output will be sent to the client, it is down to your module to generate this information. NOTE: It is NOT advisable to stop kills which originate from servers. If you do so youre risking race conditions, desyncs and worse!
506 <p>
507 Definition at line <a class="el" href="modules_8cpp-source.html#l00328">328</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
508 <p>
509 <div class="fragment"><pre>00328 { <span class="keywordflow">return</span> 0; };
510 </pre></div>    </td>
511   </tr>
512 </table>
513 <a name="a25" doxytag="Module::OnLoadModule"></a><p>
514 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
515   <tr>
516     <td class="mdRow">
517       <table cellpadding="0" cellspacing="0" border="0">
518         <tr>
519           <td class="md" nowrap valign="top"> void Module::OnLoadModule </td>
520           <td class="md" valign="top">(&nbsp;</td>
521           <td class="md" nowrap valign="top"><a class="el" href="classModule.html">Module</a> *&nbsp;</td>
522           <td class="mdname" nowrap> <em>mod</em>, </td>
523         </tr>
524         <tr>
525           <td></td>
526           <td></td>
527           <td class="md" nowrap>std::string&nbsp;</td>
528           <td class="mdname" nowrap> <em>name</em></td>
529         </tr>
530         <tr>
531           <td></td>
532           <td class="md">)&nbsp;</td>
533           <td class="md" colspan="2"><code> [virtual]</code></td>
534         </tr>
535
536       </table>
537     </td>
538   </tr>
539 </table>
540 <table cellspacing=5 cellpadding=0 border=0>
541   <tr>
542     <td>
543       &nbsp;
544     </td>
545     <td>
546
547 <p>
548 Called whenever a module is loaded. 
549 <p>
550 mod will contain a pointer to the module, and string will contain its name, for example m_widgets.so. This function is primary for dependency checking, your module may decide to enable some extra features if it sees that you have for example loaded "m_killwidgets.so" with "m_makewidgets.so". It is highly recommended that modules do *NOT* bail if they cannot satisfy dependencies, but instead operate under reduced functionality, unless the dependency is absolutely neccessary (e.g. a module that extends the features of another module).
551 <p>
552 Definition at line <a class="el" href="modules_8cpp-source.html#l00329">329</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
553 <p>
554 <div class="fragment"><pre>00329 { };
555 </pre></div>    </td>
556   </tr>
557 </table>
558 <a name="a13" doxytag="Module::OnOper"></a><p>
559 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
560   <tr>
561     <td class="mdRow">
562       <table cellpadding="0" cellspacing="0" border="0">
563         <tr>
564           <td class="md" nowrap valign="top"> void Module::OnOper </td>
565           <td class="md" valign="top">(&nbsp;</td>
566           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
567           <td class="mdname1" valign="top" nowrap> <em>user</em>          </td>
568           <td class="md" valign="top">&nbsp;)&nbsp;</td>
569           <td class="md" nowrap><code> [virtual]</code></td>
570         </tr>
571
572       </table>
573     </td>
574   </tr>
575 </table>
576 <table cellspacing=5 cellpadding=0 border=0>
577   <tr>
578     <td>
579       &nbsp;
580     </td>
581     <td>
582
583 <p>
584 Called whenever a user opers locally. 
585 <p>
586 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.
587 <p>
588 Definition at line <a class="el" href="modules_8cpp-source.html#l00317">317</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
589 <p>
590 <div class="fragment"><pre>00317 { };
591 </pre></div>    </td>
592   </tr>
593 </table>
594 <a name="a8" doxytag="Module::OnPacketReceive"></a><p>
595 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
596   <tr>
597     <td class="mdRow">
598       <table cellpadding="0" cellspacing="0" border="0">
599         <tr>
600           <td class="md" nowrap valign="top"> void Module::OnPacketReceive </td>
601           <td class="md" valign="top">(&nbsp;</td>
602           <td class="md" nowrap valign="top">char *&nbsp;</td>
603           <td class="mdname1" valign="top" nowrap> <em>p</em>          </td>
604           <td class="md" valign="top">&nbsp;)&nbsp;</td>
605           <td class="md" nowrap><code> [virtual]</code></td>
606         </tr>
607
608       </table>
609     </td>
610   </tr>
611 </table>
612 <table cellspacing=5 cellpadding=0 border=0>
613   <tr>
614     <td>
615       &nbsp;
616     </td>
617     <td>
618
619 <p>
620 Called after a packet is received from another irc server. 
621 <p>
622 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.
623 <p>
624 Definition at line <a class="el" href="modules_8cpp-source.html#l00311">311</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
625 <p>
626 <div class="fragment"><pre>00311 { }
627 </pre></div>    </td>
628   </tr>
629 </table>
630 <a name="a7" doxytag="Module::OnPacketTransmit"></a><p>
631 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
632   <tr>
633     <td class="mdRow">
634       <table cellpadding="0" cellspacing="0" border="0">
635         <tr>
636           <td class="md" nowrap valign="top"> void Module::OnPacketTransmit </td>
637           <td class="md" valign="top">(&nbsp;</td>
638           <td class="md" nowrap valign="top">char *&nbsp;</td>
639           <td class="mdname1" valign="top" nowrap> <em>p</em>          </td>
640           <td class="md" valign="top">&nbsp;)&nbsp;</td>
641           <td class="md" nowrap><code> [virtual]</code></td>
642         </tr>
643
644       </table>
645     </td>
646   </tr>
647 </table>
648 <table cellspacing=5 cellpadding=0 border=0>
649   <tr>
650     <td>
651       &nbsp;
652     </td>
653     <td>
654
655 <p>
656 Called before a packet is transmitted across the irc network between two irc servers. 
657 <p>
658 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.
659 <p>
660 Definition at line <a class="el" href="modules_8cpp-source.html#l00310">310</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
661 <p>
662 <div class="fragment"><pre>00310 { }
663 </pre></div>    </td>
664   </tr>
665 </table>
666 <a name="a9" doxytag="Module::OnRehash"></a><p>
667 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
668   <tr>
669     <td class="mdRow">
670       <table cellpadding="0" cellspacing="0" border="0">
671         <tr>
672           <td class="md" nowrap valign="top"> void Module::OnRehash </td>
673           <td class="md" valign="top">(&nbsp;</td>
674           <td class="mdname1" valign="top" nowrap>          </td>
675           <td class="md" valign="top">&nbsp;)&nbsp;</td>
676           <td class="md" nowrap><code> [virtual]</code></td>
677         </tr>
678
679       </table>
680     </td>
681   </tr>
682 </table>
683 <table cellspacing=5 cellpadding=0 border=0>
684   <tr>
685     <td>
686       &nbsp;
687     </td>
688     <td>
689
690 <p>
691 Called on rehash. 
692 <p>
693 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.
694 <p>
695 Definition at line <a class="el" href="modules_8cpp-source.html#l00312">312</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
696 <p>
697 <div class="fragment"><pre>00312 { }
698 </pre></div>    </td>
699   </tr>
700 </table>
701 <a name="a10" doxytag="Module::OnServerRaw"></a><p>
702 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
703   <tr>
704     <td class="mdRow">
705       <table cellpadding="0" cellspacing="0" border="0">
706         <tr>
707           <td class="md" nowrap valign="top"> void Module::OnServerRaw </td>
708           <td class="md" valign="top">(&nbsp;</td>
709           <td class="md" nowrap valign="top">std::string &amp;&nbsp;</td>
710           <td class="mdname" nowrap> <em>raw</em>, </td>
711         </tr>
712         <tr>
713           <td></td>
714           <td></td>
715           <td class="md" nowrap>bool&nbsp;</td>
716           <td class="mdname" nowrap> <em>inbound</em>, </td>
717         </tr>
718         <tr>
719           <td></td>
720           <td></td>
721           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
722           <td class="mdname" nowrap> <em>user</em></td>
723         </tr>
724         <tr>
725           <td></td>
726           <td class="md">)&nbsp;</td>
727           <td class="md" colspan="2"><code> [virtual]</code></td>
728         </tr>
729
730       </table>
731     </td>
732   </tr>
733 </table>
734 <table cellspacing=5 cellpadding=0 border=0>
735   <tr>
736     <td>
737       &nbsp;
738     </td>
739     <td>
740
741 <p>
742 Called when a raw command is transmitted or received. 
743 <p>
744 This method is the lowest level of handler available to a module. It will be called with raw data which is passing through a connected socket. If you wish, you may munge this data by changing the string parameter "raw". If you do this, after your function exits it will immediately be cut down to 510 characters plus a carriage return and linefeed. For INBOUND messages only (where inbound is set to true) the value of user will be the userrec of the connection sending the data. This is not possible for outbound data because the data may be being routed to multiple targets.
745 <p>
746 Definition at line <a class="el" href="modules_8cpp-source.html#l00313">313</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
747 <p>
748 <div class="fragment"><pre>00313 { }
749 </pre></div>    </td>
750   </tr>
751 </table>
752 <a name="a3" doxytag="Module::OnUserConnect"></a><p>
753 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
754   <tr>
755     <td class="mdRow">
756       <table cellpadding="0" cellspacing="0" border="0">
757         <tr>
758           <td class="md" nowrap valign="top"> void Module::OnUserConnect </td>
759           <td class="md" valign="top">(&nbsp;</td>
760           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
761           <td class="mdname1" valign="top" nowrap> <em>user</em>          </td>
762           <td class="md" valign="top">&nbsp;)&nbsp;</td>
763           <td class="md" nowrap><code> [virtual]</code></td>
764         </tr>
765
766       </table>
767     </td>
768   </tr>
769 </table>
770 <table cellspacing=5 cellpadding=0 border=0>
771   <tr>
772     <td>
773       &nbsp;
774     </td>
775     <td>
776
777 <p>
778 Called when a user connects. 
779 <p>
780 The details of the connecting user are available to you in the parameter userrec *user
781 <p>
782 Definition at line <a class="el" href="modules_8cpp-source.html#l00306">306</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
783 <p>
784 <div class="fragment"><pre>00306 { }
785 </pre></div>    </td>
786   </tr>
787 </table>
788 <a name="a5" doxytag="Module::OnUserJoin"></a><p>
789 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
790   <tr>
791     <td class="mdRow">
792       <table cellpadding="0" cellspacing="0" border="0">
793         <tr>
794           <td class="md" nowrap valign="top"> void Module::OnUserJoin </td>
795           <td class="md" valign="top">(&nbsp;</td>
796           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
797           <td class="mdname" nowrap> <em>user</em>, </td>
798         </tr>
799         <tr>
800           <td></td>
801           <td></td>
802           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
803           <td class="mdname" nowrap> <em>channel</em></td>
804         </tr>
805         <tr>
806           <td></td>
807           <td class="md">)&nbsp;</td>
808           <td class="md" colspan="2"><code> [virtual]</code></td>
809         </tr>
810
811       </table>
812     </td>
813   </tr>
814 </table>
815 <table cellspacing=5 cellpadding=0 border=0>
816   <tr>
817     <td>
818       &nbsp;
819     </td>
820     <td>
821
822 <p>
823 Called when a user joins a channel. 
824 <p>
825 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
826 <p>
827 Definition at line <a class="el" href="modules_8cpp-source.html#l00308">308</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
828 <p>
829 <div class="fragment"><pre>00308 { }
830 </pre></div>    </td>
831   </tr>
832 </table>
833 <a name="a6" doxytag="Module::OnUserPart"></a><p>
834 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
835   <tr>
836     <td class="mdRow">
837       <table cellpadding="0" cellspacing="0" border="0">
838         <tr>
839           <td class="md" nowrap valign="top"> void Module::OnUserPart </td>
840           <td class="md" valign="top">(&nbsp;</td>
841           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
842           <td class="mdname" nowrap> <em>user</em>, </td>
843         </tr>
844         <tr>
845           <td></td>
846           <td></td>
847           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
848           <td class="mdname" nowrap> <em>channel</em></td>
849         </tr>
850         <tr>
851           <td></td>
852           <td class="md">)&nbsp;</td>
853           <td class="md" colspan="2"><code> [virtual]</code></td>
854         </tr>
855
856       </table>
857     </td>
858   </tr>
859 </table>
860 <table cellspacing=5 cellpadding=0 border=0>
861   <tr>
862     <td>
863       &nbsp;
864     </td>
865     <td>
866
867 <p>
868 Called when a user parts a channel. 
869 <p>
870 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
871 <p>
872 Definition at line <a class="el" href="modules_8cpp-source.html#l00309">309</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
873 <p>
874 <div class="fragment"><pre>00309 { }
875 </pre></div>    </td>
876   </tr>
877 </table>
878 <a name="a16" doxytag="Module::OnUserPreInvite"></a><p>
879 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
880   <tr>
881     <td class="mdRow">
882       <table cellpadding="0" cellspacing="0" border="0">
883         <tr>
884           <td class="md" nowrap valign="top"> int Module::OnUserPreInvite </td>
885           <td class="md" valign="top">(&nbsp;</td>
886           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
887           <td class="mdname" nowrap> <em>source</em>, </td>
888         </tr>
889         <tr>
890           <td></td>
891           <td></td>
892           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
893           <td class="mdname" nowrap> <em>dest</em>, </td>
894         </tr>
895         <tr>
896           <td></td>
897           <td></td>
898           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
899           <td class="mdname" nowrap> <em>channel</em></td>
900         </tr>
901         <tr>
902           <td></td>
903           <td class="md">)&nbsp;</td>
904           <td class="md" colspan="2"><code> [virtual]</code></td>
905         </tr>
906
907       </table>
908     </td>
909   </tr>
910 </table>
911 <table cellspacing=5 cellpadding=0 border=0>
912   <tr>
913     <td>
914       &nbsp;
915     </td>
916     <td>
917
918 <p>
919 Called whenever a user is about to invite another user into a channel, before any processing is done. 
920 <p>
921 Returning 1 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 invites to channels.
922 <p>
923 Definition at line <a class="el" href="modules_8cpp-source.html#l00320">320</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
924 <p>
925 <div class="fragment"><pre>00320 { <span class="keywordflow">return</span> 0; };
926 </pre></div>    </td>
927   </tr>
928 </table>
929 <a name="a12" doxytag="Module::OnUserPreJoin"></a><p>
930 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
931   <tr>
932     <td class="mdRow">
933       <table cellpadding="0" cellspacing="0" border="0">
934         <tr>
935           <td class="md" nowrap valign="top"> int Module::OnUserPreJoin </td>
936           <td class="md" valign="top">(&nbsp;</td>
937           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
938           <td class="mdname" nowrap> <em>user</em>, </td>
939         </tr>
940         <tr>
941           <td></td>
942           <td></td>
943           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
944           <td class="mdname" nowrap> <em>chan</em>, </td>
945         </tr>
946         <tr>
947           <td></td>
948           <td></td>
949           <td class="md" nowrap>const char *&nbsp;</td>
950           <td class="mdname" nowrap> <em>cname</em></td>
951         </tr>
952         <tr>
953           <td></td>
954           <td class="md">)&nbsp;</td>
955           <td class="md" colspan="2"><code> [virtual]</code></td>
956         </tr>
957
958       </table>
959     </td>
960   </tr>
961 </table>
962 <table cellspacing=5 cellpadding=0 border=0>
963   <tr>
964     <td>
965       &nbsp;
966     </td>
967     <td>
968
969 <p>
970 Called whenever a user is about to join a channel, before any processing is done. 
971 <p>
972 Returning a value of 1 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. Returning -1 from this function forces the join to be allowed, bypassing restrictions such as banlists, invite, keys etc.<p>
973 IMPORTANT NOTE!<p>
974 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.
975 <p>
976 Definition at line <a class="el" href="modules_8cpp-source.html#l00314">314</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
977 <p>
978 <div class="fragment"><pre>00314 { <span class="keywordflow">return</span> 0; }
979 </pre></div>    </td>
980   </tr>
981 </table>
982 <a name="a17" doxytag="Module::OnUserPreMessage"></a><p>
983 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
984   <tr>
985     <td class="mdRow">
986       <table cellpadding="0" cellspacing="0" border="0">
987         <tr>
988           <td class="md" nowrap valign="top"> int Module::OnUserPreMessage </td>
989           <td class="md" valign="top">(&nbsp;</td>
990           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
991           <td class="mdname" nowrap> <em>user</em>, </td>
992         </tr>
993         <tr>
994           <td></td>
995           <td></td>
996           <td class="md" nowrap>void *&nbsp;</td>
997           <td class="mdname" nowrap> <em>dest</em>, </td>
998         </tr>
999         <tr>
1000           <td></td>
1001           <td></td>
1002           <td class="md" nowrap>int&nbsp;</td>
1003           <td class="mdname" nowrap> <em>target_type</em>, </td>
1004         </tr>
1005         <tr>
1006           <td></td>
1007           <td></td>
1008           <td class="md" nowrap>std::string &amp;&nbsp;</td>
1009           <td class="mdname" nowrap> <em>text</em></td>
1010         </tr>
1011         <tr>
1012           <td></td>
1013           <td class="md">)&nbsp;</td>
1014           <td class="md" colspan="2"><code> [virtual]</code></td>
1015         </tr>
1016
1017       </table>
1018     </td>
1019   </tr>
1020 </table>
1021 <table cellspacing=5 cellpadding=0 border=0>
1022   <tr>
1023     <td>
1024       &nbsp;
1025     </td>
1026     <td>
1027
1028 <p>
1029 Called whenever a user is about to PRIVMSG A user or a channel, before any processing is done. 
1030 <p>
1031 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.
1032 <p>
1033 Definition at line <a class="el" href="modules_8cpp-source.html#l00321">321</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1034 <p>
1035 <div class="fragment"><pre>00321 { <span class="keywordflow">return</span> 0; };
1036 </pre></div>    </td>
1037   </tr>
1038 </table>
1039 <a name="a19" doxytag="Module::OnUserPreNick"></a><p>
1040 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1041   <tr>
1042     <td class="mdRow">
1043       <table cellpadding="0" cellspacing="0" border="0">
1044         <tr>
1045           <td class="md" nowrap valign="top"> int Module::OnUserPreNick </td>
1046           <td class="md" valign="top">(&nbsp;</td>
1047           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1048           <td class="mdname" nowrap> <em>user</em>, </td>
1049         </tr>
1050         <tr>
1051           <td></td>
1052           <td></td>
1053           <td class="md" nowrap>std::string&nbsp;</td>
1054           <td class="mdname" nowrap> <em>newnick</em></td>
1055         </tr>
1056         <tr>
1057           <td></td>
1058           <td class="md">)&nbsp;</td>
1059           <td class="md" colspan="2"><code> [virtual]</code></td>
1060         </tr>
1061
1062       </table>
1063     </td>
1064   </tr>
1065 </table>
1066 <table cellspacing=5 cellpadding=0 border=0>
1067   <tr>
1068     <td>
1069       &nbsp;
1070     </td>
1071     <td>
1072
1073 <p>
1074 Called before any nickchange, local or remote. 
1075 <p>
1076 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. You may alter the message text as you wish before relinquishing control to the next module in the chain, and if no other modules block the text this altered form of the text will be sent out to the user and possibly to other servers.
1077 <p>
1078 Definition at line <a class="el" href="modules_8cpp-source.html#l00323">323</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1079 <p>
1080 <div class="fragment"><pre>00323 { <span class="keywordflow">return</span> 0; };
1081 </pre></div>    </td>
1082   </tr>
1083 </table>
1084 <a name="a18" doxytag="Module::OnUserPreNotice"></a><p>
1085 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1086   <tr>
1087     <td class="mdRow">
1088       <table cellpadding="0" cellspacing="0" border="0">
1089         <tr>
1090           <td class="md" nowrap valign="top"> int Module::OnUserPreNotice </td>
1091           <td class="md" valign="top">(&nbsp;</td>
1092           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1093           <td class="mdname" nowrap> <em>user</em>, </td>
1094         </tr>
1095         <tr>
1096           <td></td>
1097           <td></td>
1098           <td class="md" nowrap>void *&nbsp;</td>
1099           <td class="mdname" nowrap> <em>dest</em>, </td>
1100         </tr>
1101         <tr>
1102           <td></td>
1103           <td></td>
1104           <td class="md" nowrap>int&nbsp;</td>
1105           <td class="mdname" nowrap> <em>target_type</em>, </td>
1106         </tr>
1107         <tr>
1108           <td></td>
1109           <td></td>
1110           <td class="md" nowrap>std::string &amp;&nbsp;</td>
1111           <td class="mdname" nowrap> <em>text</em></td>
1112         </tr>
1113         <tr>
1114           <td></td>
1115           <td class="md">)&nbsp;</td>
1116           <td class="md" colspan="2"><code> [virtual]</code></td>
1117         </tr>
1118
1119       </table>
1120     </td>
1121   </tr>
1122 </table>
1123 <table cellspacing=5 cellpadding=0 border=0>
1124   <tr>
1125     <td>
1126       &nbsp;
1127     </td>
1128     <td>
1129
1130 <p>
1131 Called whenever a user is about to NOTICE A user or a channel, before any processing is done. 
1132 <p>
1133 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. You may alter the message text as you wish before relinquishing control to the next module in the chain, and if no other modules block the text this altered form of the text will be sent out to the user and possibly to other servers.
1134 <p>
1135 Definition at line <a class="el" href="modules_8cpp-source.html#l00322">322</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1136 <p>
1137 <div class="fragment"><pre>00322 { <span class="keywordflow">return</span> 0; };
1138 </pre></div>    </td>
1139   </tr>
1140 </table>
1141 <a name="a4" doxytag="Module::OnUserQuit"></a><p>
1142 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1143   <tr>
1144     <td class="mdRow">
1145       <table cellpadding="0" cellspacing="0" border="0">
1146         <tr>
1147           <td class="md" nowrap valign="top"> void Module::OnUserQuit </td>
1148           <td class="md" valign="top">(&nbsp;</td>
1149           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1150           <td class="mdname1" valign="top" nowrap> <em>user</em>          </td>
1151           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1152           <td class="md" nowrap><code> [virtual]</code></td>
1153         </tr>
1154
1155       </table>
1156     </td>
1157   </tr>
1158 </table>
1159 <table cellspacing=5 cellpadding=0 border=0>
1160   <tr>
1161     <td>
1162       &nbsp;
1163     </td>
1164     <td>
1165
1166 <p>
1167 Called when a user quits. 
1168 <p>
1169 The details of the exiting user are available to you in the parameter userrec *user
1170 <p>
1171 Definition at line <a class="el" href="modules_8cpp-source.html#l00307">307</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1172 <p>
1173 <div class="fragment"><pre>00307 { }
1174 </pre></div>    </td>
1175   </tr>
1176 </table>
1177 <a name="a21" doxytag="Module::OnUserSync"></a><p>
1178 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1179   <tr>
1180     <td class="mdRow">
1181       <table cellpadding="0" cellspacing="0" border="0">
1182         <tr>
1183           <td class="md" nowrap valign="top"> <a class="el" href="modules_8h.html#a27">string_list</a> Module::OnUserSync </td>
1184           <td class="md" valign="top">(&nbsp;</td>
1185           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1186           <td class="mdname1" valign="top" nowrap> <em>user</em>          </td>
1187           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1188           <td class="md" nowrap><code> [virtual]</code></td>
1189         </tr>
1190
1191       </table>
1192     </td>
1193   </tr>
1194 </table>
1195 <table cellspacing=5 cellpadding=0 border=0>
1196   <tr>
1197     <td>
1198       &nbsp;
1199     </td>
1200     <td>
1201
1202 <p>
1203 Called during a netburst to sync user data. 
1204 <p>
1205 This is called during the netburst on a per-user basis. You should use this call to up any special user-related things which are implemented by your module, e.g. sending listmodes. You may return multiple commands in the string_list.
1206 <p>
1207 Definition at line <a class="el" href="modules_8cpp-source.html#l00325">325</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1208 <p>
1209 References <a class="el" href="modules_8h-source.html#l00061">string_list</a>.
1210 <p>
1211 <div class="fragment"><pre>00325 { <a class="code" href="modules_8h.html#a27">string_list</a> empty; <span class="keywordflow">return</span> empty; }
1212 </pre></div>    </td>
1213   </tr>
1214 </table>
1215 <a name="a15" doxytag="Module::OnWhois"></a><p>
1216 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1217   <tr>
1218     <td class="mdRow">
1219       <table cellpadding="0" cellspacing="0" border="0">
1220         <tr>
1221           <td class="md" nowrap valign="top"> void Module::OnWhois </td>
1222           <td class="md" valign="top">(&nbsp;</td>
1223           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1224           <td class="mdname" nowrap> <em>source</em>, </td>
1225         </tr>
1226         <tr>
1227           <td></td>
1228           <td></td>
1229           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1230           <td class="mdname" nowrap> <em>dest</em></td>
1231         </tr>
1232         <tr>
1233           <td></td>
1234           <td class="md">)&nbsp;</td>
1235           <td class="md" colspan="2"><code> [virtual]</code></td>
1236         </tr>
1237
1238       </table>
1239     </td>
1240   </tr>
1241 </table>
1242 <table cellspacing=5 cellpadding=0 border=0>
1243   <tr>
1244     <td>
1245       &nbsp;
1246     </td>
1247     <td>
1248
1249 <p>
1250 Called whenever a /WHOIS is performed on a local user. 
1251 <p>
1252 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.
1253 <p>
1254 Definition at line <a class="el" href="modules_8cpp-source.html#l00319">319</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1255 <p>
1256 <div class="fragment"><pre>00319 { };
1257 </pre></div>    </td>
1258   </tr>
1259 </table>
1260 <hr>The documentation for this class was generated from the following files:<ul>
1261 <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>
1262 <hr size="1"><address style="align: right;"><small>Generated on Sat Apr 2 19:27:06 2005 for InspIRCd by
1263 <a href="http://www.doxygen.org/index.html">
1264 <img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
1265 </a>1.3.3 </small></address>
1266 </body>
1267 </html>