]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/classModule.html
New docs to match extra module Version class stuff, etc
[user/henk/code/inspircd.git] / docs / module-doc / classModule.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3 <title>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#a31">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 void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a20">OnUserPostNick</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string oldnick)</td></tr>
79
80 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called after any nickchange, local or remote. </em> <a href="#a20"></a><em><br><br></td></tr>
81 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a21">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>
82
83 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called before an action which requires a channel privilage check. </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#a31">string_list</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a22">OnUserSync</a> (<a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
85
86 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called during a netburst to sync user data. </em> <a href="#a22"></a><em><br><br></td></tr>
87 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="modules_8h.html#a31">string_list</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a23">OnChannelSync</a> (<a class="el" href="classchanrec.html">chanrec</a> *chan)</td></tr>
88
89 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called during a netburst to sync channel data. </em> <a href="#a23"></a><em><br><br></td></tr>
90 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a24">On005Numeric</a> (std::string &amp;output)</td></tr>
91
92 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called when a 005 numeric is about to be output. </em> <a href="#a24"></a><em><br><br></td></tr>
93 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a25">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>
94
95 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called when a client is disconnected by KILL. </em> <a href="#a25"></a><em><br><br></td></tr>
96 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a26">OnLoadModule</a> (<a class="el" href="classModule.html">Module</a> *mod, std::string name)</td></tr>
97
98 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called whenever a module is loaded. </em> <a href="#a26"></a><em><br><br></td></tr>
99 </table>
100 <hr><a name="_details"></a><h2>Detailed Description</h2>
101 Base class for all InspIRCd modules This class is the base class for InspIRCd modules. 
102 <p>
103 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. 
104 <p>
105
106 <p>
107 Definition at line <a class="el" href="modules_8h-source.html#l00133">133</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
108 <a name="a0" doxytag="Module::Module"></a><p>
109 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
110   <tr>
111     <td class="mdRow">
112       <table cellpadding="0" cellspacing="0" border="0">
113         <tr>
114           <td class="md" nowrap valign="top"> Module::Module </td>
115           <td class="md" valign="top">(&nbsp;</td>
116           <td class="mdname1" valign="top" nowrap>          </td>
117           <td class="md" valign="top">&nbsp;)&nbsp;</td>
118           <td class="md" nowrap></td>
119         </tr>
120
121       </table>
122     </td>
123   </tr>
124 </table>
125 <table cellspacing=5 cellpadding=0 border=0>
126   <tr>
127     <td>
128       &nbsp;
129     </td>
130     <td>
131
132 <p>
133 Default constructor creates a module class. 
134 <p>
135
136 <p>
137 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>.
138 <p>
139 <div class="fragment"><pre>00306 { }
140 </pre></div>    </td>
141   </tr>
142 </table>
143 <a name="a1" doxytag="Module::~Module"></a><p>
144 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
145   <tr>
146     <td class="mdRow">
147       <table cellpadding="0" cellspacing="0" border="0">
148         <tr>
149           <td class="md" nowrap valign="top"> Module::~<a class="el" href="classModule.html">Module</a> </td>
150           <td class="md" valign="top">(&nbsp;</td>
151           <td class="mdname1" valign="top" nowrap>          </td>
152           <td class="md" valign="top">&nbsp;)&nbsp;</td>
153           <td class="md" nowrap><code> [virtual]</code></td>
154         </tr>
155
156       </table>
157     </td>
158   </tr>
159 </table>
160 <table cellspacing=5 cellpadding=0 border=0>
161   <tr>
162     <td>
163       &nbsp;
164     </td>
165     <td>
166
167 <p>
168 Default destructor destroys a module class. 
169 <p>
170
171 <p>
172 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>.
173 <p>
174 <div class="fragment"><pre>00307 { }
175 </pre></div>    </td>
176   </tr>
177 </table>
178 <hr><h2>Member Function Documentation</h2>
179 <a name="a2" doxytag="Module::GetVersion"></a><p>
180 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
181   <tr>
182     <td class="mdRow">
183       <table cellpadding="0" cellspacing="0" border="0">
184         <tr>
185           <td class="md" nowrap valign="top"> <a class="el" href="classVersion.html">Version</a> Module::GetVersion </td>
186           <td class="md" valign="top">(&nbsp;</td>
187           <td class="mdname1" valign="top" nowrap>          </td>
188           <td class="md" valign="top">&nbsp;)&nbsp;</td>
189           <td class="md" nowrap><code> [virtual]</code></td>
190         </tr>
191
192       </table>
193     </td>
194   </tr>
195 </table>
196 <table cellspacing=5 cellpadding=0 border=0>
197   <tr>
198     <td>
199       &nbsp;
200     </td>
201     <td>
202
203 <p>
204 Returns the version number of a Module. 
205 <p>
206 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>
207 <p>
208 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>.
209 <p>
210 References <a class="el" href="modules_8h-source.html#l00054">VF_VENDOR</a>.
211 <p>
212 <div class="fragment"><pre>00318 { <span class="keywordflow">return</span> <a class="code" href="classVersion.html">Version</a>(1,0,0,0,VF_VENDOR); }
213 </pre></div>    </td>
214   </tr>
215 </table>
216 <a name="a24" doxytag="Module::On005Numeric"></a><p>
217 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
218   <tr>
219     <td class="mdRow">
220       <table cellpadding="0" cellspacing="0" border="0">
221         <tr>
222           <td class="md" nowrap valign="top"> void Module::On005Numeric </td>
223           <td class="md" valign="top">(&nbsp;</td>
224           <td class="md" nowrap valign="top">std::string &amp;&nbsp;</td>
225           <td class="mdname1" valign="top" nowrap> <em>output</em>          </td>
226           <td class="md" valign="top">&nbsp;)&nbsp;</td>
227           <td class="md" nowrap><code> [virtual]</code></td>
228         </tr>
229
230       </table>
231     </td>
232   </tr>
233 </table>
234 <table cellspacing=5 cellpadding=0 border=0>
235   <tr>
236     <td>
237       &nbsp;
238     </td>
239     <td>
240
241 <p>
242 Called when a 005 numeric is about to be output. 
243 <p>
244 The module should modify the 005 numeric if needed to indicate its features.
245 <p>
246 Definition at line <a class="el" href="modules_8cpp-source.html#l00330">330</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
247 <p>
248 <div class="fragment"><pre>00330 { };
249 </pre></div>    </td>
250   </tr>
251 </table>
252 <a name="a21" doxytag="Module::OnAccessCheck"></a><p>
253 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
254   <tr>
255     <td class="mdRow">
256       <table cellpadding="0" cellspacing="0" border="0">
257         <tr>
258           <td class="md" nowrap valign="top"> int Module::OnAccessCheck </td>
259           <td class="md" valign="top">(&nbsp;</td>
260           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
261           <td class="mdname" nowrap> <em>source</em>, </td>
262         </tr>
263         <tr>
264           <td></td>
265           <td></td>
266           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
267           <td class="mdname" nowrap> <em>dest</em>, </td>
268         </tr>
269         <tr>
270           <td></td>
271           <td></td>
272           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
273           <td class="mdname" nowrap> <em>channel</em>, </td>
274         </tr>
275         <tr>
276           <td></td>
277           <td></td>
278           <td class="md" nowrap>int&nbsp;</td>
279           <td class="mdname" nowrap> <em>access_type</em></td>
280         </tr>
281         <tr>
282           <td></td>
283           <td class="md">)&nbsp;</td>
284           <td class="md" colspan="2"><code> [virtual]</code></td>
285         </tr>
286
287       </table>
288     </td>
289   </tr>
290 </table>
291 <table cellspacing=5 cellpadding=0 border=0>
292   <tr>
293     <td>
294       &nbsp;
295     </td>
296     <td>
297
298 <p>
299 Called before an action which requires a channel privilage check. 
300 <p>
301 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>
302 <br>
303  AC_KICK (0) - A user is being kicked<br>
304  AC_DEOP (1) - a user is being deopped<br>
305  AC_OP (2) - a user is being opped<br>
306  AC_VOICE (3) - a user is being voiced<br>
307  AC_DEVOICE (4) - a user is being devoiced<br>
308  AC_HALFOP (5) - a user is being halfopped<br>
309  AC_DEHALFOP (6) - a user is being dehalfopped<br>
310  AC_INVITE (7) - a user is being invited<br>
311  AC_GENERAL_MODE (8) - a user channel mode is being changed<br>
312 <br>
313  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).
314 <p>
315 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>.
316 <p>
317 References <a class="el" href="modules_8h-source.html#l00037">ACR_DEFAULT</a>.
318 <p>
319 <div class="fragment"><pre>00327 { <span class="keywordflow">return</span> <a class="code" href="modules_8h.html#a8">ACR_DEFAULT</a>; };
320 </pre></div>    </td>
321   </tr>
322 </table>
323 <a name="a23" doxytag="Module::OnChannelSync"></a><p>
324 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
325   <tr>
326     <td class="mdRow">
327       <table cellpadding="0" cellspacing="0" border="0">
328         <tr>
329           <td class="md" nowrap valign="top"> <a class="el" href="modules_8h.html#a31">string_list</a> Module::OnChannelSync </td>
330           <td class="md" valign="top">(&nbsp;</td>
331           <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
332           <td class="mdname1" valign="top" nowrap> <em>chan</em>          </td>
333           <td class="md" valign="top">&nbsp;)&nbsp;</td>
334           <td class="md" nowrap><code> [virtual]</code></td>
335         </tr>
336
337       </table>
338     </td>
339   </tr>
340 </table>
341 <table cellspacing=5 cellpadding=0 border=0>
342   <tr>
343     <td>
344       &nbsp;
345     </td>
346     <td>
347
348 <p>
349 Called during a netburst to sync channel data. 
350 <p>
351 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.
352 <p>
353 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>.
354 <p>
355 References <a class="el" href="modules_8h-source.html#l00068">string_list</a>.
356 <p>
357 <div class="fragment"><pre>00329 { <a class="code" href="modules_8h.html#a31">string_list</a> empty; <span class="keywordflow">return</span> empty; }
358 </pre></div>    </td>
359   </tr>
360 </table>
361 <a name="a11" doxytag="Module::OnExtendedMode"></a><p>
362 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
363   <tr>
364     <td class="mdRow">
365       <table cellpadding="0" cellspacing="0" border="0">
366         <tr>
367           <td class="md" nowrap valign="top"> int Module::OnExtendedMode </td>
368           <td class="md" valign="top">(&nbsp;</td>
369           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
370           <td class="mdname" nowrap> <em>user</em>, </td>
371         </tr>
372         <tr>
373           <td></td>
374           <td></td>
375           <td class="md" nowrap>void *&nbsp;</td>
376           <td class="mdname" nowrap> <em>target</em>, </td>
377         </tr>
378         <tr>
379           <td></td>
380           <td></td>
381           <td class="md" nowrap>char&nbsp;</td>
382           <td class="mdname" nowrap> <em>modechar</em>, </td>
383         </tr>
384         <tr>
385           <td></td>
386           <td></td>
387           <td class="md" nowrap>int&nbsp;</td>
388           <td class="mdname" nowrap> <em>type</em>, </td>
389         </tr>
390         <tr>
391           <td></td>
392           <td></td>
393           <td class="md" nowrap>bool&nbsp;</td>
394           <td class="mdname" nowrap> <em>mode_on</em>, </td>
395         </tr>
396         <tr>
397           <td></td>
398           <td></td>
399           <td class="md" nowrap><a class="el" href="modules_8h.html#a31">string_list</a> &amp;&nbsp;</td>
400           <td class="mdname" nowrap> <em>params</em></td>
401         </tr>
402         <tr>
403           <td></td>
404           <td class="md">)&nbsp;</td>
405           <td class="md" colspan="2"><code> [virtual]</code></td>
406         </tr>
407
408       </table>
409     </td>
410   </tr>
411 </table>
412 <table cellspacing=5 cellpadding=0 border=0>
413   <tr>
414     <td>
415       &nbsp;
416     </td>
417     <td>
418
419 <p>
420 Called whenever an extended mode is to be processed. 
421 <p>
422 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.
423 <p>
424 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>.
425 <p>
426 <div class="fragment"><pre>00317 { <span class="keywordflow">return</span> <span class="keyword">false</span>; }
427 </pre></div>    </td>
428   </tr>
429 </table>
430 <a name="a14" doxytag="Module::OnInfo"></a><p>
431 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
432   <tr>
433     <td class="mdRow">
434       <table cellpadding="0" cellspacing="0" border="0">
435         <tr>
436           <td class="md" nowrap valign="top"> void Module::OnInfo </td>
437           <td class="md" valign="top">(&nbsp;</td>
438           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
439           <td class="mdname1" valign="top" nowrap> <em>user</em>          </td>
440           <td class="md" valign="top">&nbsp;)&nbsp;</td>
441           <td class="md" nowrap><code> [virtual]</code></td>
442         </tr>
443
444       </table>
445     </td>
446   </tr>
447 </table>
448 <table cellspacing=5 cellpadding=0 border=0>
449   <tr>
450     <td>
451       &nbsp;
452     </td>
453     <td>
454
455 <p>
456 Called whenever a user types /INFO. 
457 <p>
458 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>
459 &lt;nick&gt; :information here
460 <p>
461 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>.
462 <p>
463 <div class="fragment"><pre>00320 { };
464 </pre></div>    </td>
465   </tr>
466 </table>
467 <a name="a25" doxytag="Module::OnKill"></a><p>
468 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
469   <tr>
470     <td class="mdRow">
471       <table cellpadding="0" cellspacing="0" border="0">
472         <tr>
473           <td class="md" nowrap valign="top"> int Module::OnKill </td>
474           <td class="md" valign="top">(&nbsp;</td>
475           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
476           <td class="mdname" nowrap> <em>source</em>, </td>
477         </tr>
478         <tr>
479           <td></td>
480           <td></td>
481           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
482           <td class="mdname" nowrap> <em>dest</em>, </td>
483         </tr>
484         <tr>
485           <td></td>
486           <td></td>
487           <td class="md" nowrap>std::string&nbsp;</td>
488           <td class="mdname" nowrap> <em>reason</em></td>
489         </tr>
490         <tr>
491           <td></td>
492           <td class="md">)&nbsp;</td>
493           <td class="md" colspan="2"><code> [virtual]</code></td>
494         </tr>
495
496       </table>
497     </td>
498   </tr>
499 </table>
500 <table cellspacing=5 cellpadding=0 border=0>
501   <tr>
502     <td>
503       &nbsp;
504     </td>
505     <td>
506
507 <p>
508 Called when a client is disconnected by KILL. 
509 <p>
510 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!
511 <p>
512 Definition at line <a class="el" href="modules_8cpp-source.html#l00331">331</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
513 <p>
514 <div class="fragment"><pre>00331 { <span class="keywordflow">return</span> 0; };
515 </pre></div>    </td>
516   </tr>
517 </table>
518 <a name="a26" doxytag="Module::OnLoadModule"></a><p>
519 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
520   <tr>
521     <td class="mdRow">
522       <table cellpadding="0" cellspacing="0" border="0">
523         <tr>
524           <td class="md" nowrap valign="top"> void Module::OnLoadModule </td>
525           <td class="md" valign="top">(&nbsp;</td>
526           <td class="md" nowrap valign="top"><a class="el" href="classModule.html">Module</a> *&nbsp;</td>
527           <td class="mdname" nowrap> <em>mod</em>, </td>
528         </tr>
529         <tr>
530           <td></td>
531           <td></td>
532           <td class="md" nowrap>std::string&nbsp;</td>
533           <td class="mdname" nowrap> <em>name</em></td>
534         </tr>
535         <tr>
536           <td></td>
537           <td class="md">)&nbsp;</td>
538           <td class="md" colspan="2"><code> [virtual]</code></td>
539         </tr>
540
541       </table>
542     </td>
543   </tr>
544 </table>
545 <table cellspacing=5 cellpadding=0 border=0>
546   <tr>
547     <td>
548       &nbsp;
549     </td>
550     <td>
551
552 <p>
553 Called whenever a module is loaded. 
554 <p>
555 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).
556 <p>
557 Definition at line <a class="el" href="modules_8cpp-source.html#l00332">332</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
558 <p>
559 <div class="fragment"><pre>00332 { };
560 </pre></div>    </td>
561   </tr>
562 </table>
563 <a name="a13" doxytag="Module::OnOper"></a><p>
564 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
565   <tr>
566     <td class="mdRow">
567       <table cellpadding="0" cellspacing="0" border="0">
568         <tr>
569           <td class="md" nowrap valign="top"> void Module::OnOper </td>
570           <td class="md" valign="top">(&nbsp;</td>
571           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
572           <td class="mdname1" valign="top" nowrap> <em>user</em>          </td>
573           <td class="md" valign="top">&nbsp;)&nbsp;</td>
574           <td class="md" nowrap><code> [virtual]</code></td>
575         </tr>
576
577       </table>
578     </td>
579   </tr>
580 </table>
581 <table cellspacing=5 cellpadding=0 border=0>
582   <tr>
583     <td>
584       &nbsp;
585     </td>
586     <td>
587
588 <p>
589 Called whenever a user opers locally. 
590 <p>
591 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.
592 <p>
593 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>.
594 <p>
595 <div class="fragment"><pre>00319 { };
596 </pre></div>    </td>
597   </tr>
598 </table>
599 <a name="a8" doxytag="Module::OnPacketReceive"></a><p>
600 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
601   <tr>
602     <td class="mdRow">
603       <table cellpadding="0" cellspacing="0" border="0">
604         <tr>
605           <td class="md" nowrap valign="top"> void Module::OnPacketReceive </td>
606           <td class="md" valign="top">(&nbsp;</td>
607           <td class="md" nowrap valign="top">char *&nbsp;</td>
608           <td class="mdname1" valign="top" nowrap> <em>p</em>          </td>
609           <td class="md" valign="top">&nbsp;)&nbsp;</td>
610           <td class="md" nowrap><code> [virtual]</code></td>
611         </tr>
612
613       </table>
614     </td>
615   </tr>
616 </table>
617 <table cellspacing=5 cellpadding=0 border=0>
618   <tr>
619     <td>
620       &nbsp;
621     </td>
622     <td>
623
624 <p>
625 Called after a packet is received from another irc server. 
626 <p>
627 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.
628 <p>
629 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>.
630 <p>
631 <div class="fragment"><pre>00313 { }
632 </pre></div>    </td>
633   </tr>
634 </table>
635 <a name="a7" doxytag="Module::OnPacketTransmit"></a><p>
636 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
637   <tr>
638     <td class="mdRow">
639       <table cellpadding="0" cellspacing="0" border="0">
640         <tr>
641           <td class="md" nowrap valign="top"> void Module::OnPacketTransmit </td>
642           <td class="md" valign="top">(&nbsp;</td>
643           <td class="md" nowrap valign="top">char *&nbsp;</td>
644           <td class="mdname1" valign="top" nowrap> <em>p</em>          </td>
645           <td class="md" valign="top">&nbsp;)&nbsp;</td>
646           <td class="md" nowrap><code> [virtual]</code></td>
647         </tr>
648
649       </table>
650     </td>
651   </tr>
652 </table>
653 <table cellspacing=5 cellpadding=0 border=0>
654   <tr>
655     <td>
656       &nbsp;
657     </td>
658     <td>
659
660 <p>
661 Called before a packet is transmitted across the irc network between two irc servers. 
662 <p>
663 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.
664 <p>
665 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>.
666 <p>
667 <div class="fragment"><pre>00312 { }
668 </pre></div>    </td>
669   </tr>
670 </table>
671 <a name="a9" doxytag="Module::OnRehash"></a><p>
672 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
673   <tr>
674     <td class="mdRow">
675       <table cellpadding="0" cellspacing="0" border="0">
676         <tr>
677           <td class="md" nowrap valign="top"> void Module::OnRehash </td>
678           <td class="md" valign="top">(&nbsp;</td>
679           <td class="mdname1" valign="top" nowrap>          </td>
680           <td class="md" valign="top">&nbsp;)&nbsp;</td>
681           <td class="md" nowrap><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 on rehash. 
697 <p>
698 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.
699 <p>
700 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>.
701 <p>
702 <div class="fragment"><pre>00314 { }
703 </pre></div>    </td>
704   </tr>
705 </table>
706 <a name="a10" doxytag="Module::OnServerRaw"></a><p>
707 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
708   <tr>
709     <td class="mdRow">
710       <table cellpadding="0" cellspacing="0" border="0">
711         <tr>
712           <td class="md" nowrap valign="top"> void Module::OnServerRaw </td>
713           <td class="md" valign="top">(&nbsp;</td>
714           <td class="md" nowrap valign="top">std::string &amp;&nbsp;</td>
715           <td class="mdname" nowrap> <em>raw</em>, </td>
716         </tr>
717         <tr>
718           <td></td>
719           <td></td>
720           <td class="md" nowrap>bool&nbsp;</td>
721           <td class="mdname" nowrap> <em>inbound</em>, </td>
722         </tr>
723         <tr>
724           <td></td>
725           <td></td>
726           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
727           <td class="mdname" nowrap> <em>user</em></td>
728         </tr>
729         <tr>
730           <td></td>
731           <td class="md">)&nbsp;</td>
732           <td class="md" colspan="2"><code> [virtual]</code></td>
733         </tr>
734
735       </table>
736     </td>
737   </tr>
738 </table>
739 <table cellspacing=5 cellpadding=0 border=0>
740   <tr>
741     <td>
742       &nbsp;
743     </td>
744     <td>
745
746 <p>
747 Called when a raw command is transmitted or received. 
748 <p>
749 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.
750 <p>
751 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>.
752 <p>
753 <div class="fragment"><pre>00315 { }
754 </pre></div>    </td>
755   </tr>
756 </table>
757 <a name="a3" doxytag="Module::OnUserConnect"></a><p>
758 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
759   <tr>
760     <td class="mdRow">
761       <table cellpadding="0" cellspacing="0" border="0">
762         <tr>
763           <td class="md" nowrap valign="top"> void Module::OnUserConnect </td>
764           <td class="md" valign="top">(&nbsp;</td>
765           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
766           <td class="mdname1" valign="top" nowrap> <em>user</em>          </td>
767           <td class="md" valign="top">&nbsp;)&nbsp;</td>
768           <td class="md" nowrap><code> [virtual]</code></td>
769         </tr>
770
771       </table>
772     </td>
773   </tr>
774 </table>
775 <table cellspacing=5 cellpadding=0 border=0>
776   <tr>
777     <td>
778       &nbsp;
779     </td>
780     <td>
781
782 <p>
783 Called when a user connects. 
784 <p>
785 The details of the connecting user are available to you in the parameter userrec *user
786 <p>
787 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>.
788 <p>
789 <div class="fragment"><pre>00308 { }
790 </pre></div>    </td>
791   </tr>
792 </table>
793 <a name="a5" doxytag="Module::OnUserJoin"></a><p>
794 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
795   <tr>
796     <td class="mdRow">
797       <table cellpadding="0" cellspacing="0" border="0">
798         <tr>
799           <td class="md" nowrap valign="top"> void Module::OnUserJoin </td>
800           <td class="md" valign="top">(&nbsp;</td>
801           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
802           <td class="mdname" nowrap> <em>user</em>, </td>
803         </tr>
804         <tr>
805           <td></td>
806           <td></td>
807           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
808           <td class="mdname" nowrap> <em>channel</em></td>
809         </tr>
810         <tr>
811           <td></td>
812           <td class="md">)&nbsp;</td>
813           <td class="md" colspan="2"><code> [virtual]</code></td>
814         </tr>
815
816       </table>
817     </td>
818   </tr>
819 </table>
820 <table cellspacing=5 cellpadding=0 border=0>
821   <tr>
822     <td>
823       &nbsp;
824     </td>
825     <td>
826
827 <p>
828 Called when a user joins a channel. 
829 <p>
830 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
831 <p>
832 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>.
833 <p>
834 <div class="fragment"><pre>00310 { }
835 </pre></div>    </td>
836   </tr>
837 </table>
838 <a name="a6" doxytag="Module::OnUserPart"></a><p>
839 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
840   <tr>
841     <td class="mdRow">
842       <table cellpadding="0" cellspacing="0" border="0">
843         <tr>
844           <td class="md" nowrap valign="top"> void Module::OnUserPart </td>
845           <td class="md" valign="top">(&nbsp;</td>
846           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
847           <td class="mdname" nowrap> <em>user</em>, </td>
848         </tr>
849         <tr>
850           <td></td>
851           <td></td>
852           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
853           <td class="mdname" nowrap> <em>channel</em></td>
854         </tr>
855         <tr>
856           <td></td>
857           <td class="md">)&nbsp;</td>
858           <td class="md" colspan="2"><code> [virtual]</code></td>
859         </tr>
860
861       </table>
862     </td>
863   </tr>
864 </table>
865 <table cellspacing=5 cellpadding=0 border=0>
866   <tr>
867     <td>
868       &nbsp;
869     </td>
870     <td>
871
872 <p>
873 Called when a user parts a channel. 
874 <p>
875 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
876 <p>
877 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>.
878 <p>
879 <div class="fragment"><pre>00311 { }
880 </pre></div>    </td>
881   </tr>
882 </table>
883 <a name="a20" doxytag="Module::OnUserPostNick"></a><p>
884 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
885   <tr>
886     <td class="mdRow">
887       <table cellpadding="0" cellspacing="0" border="0">
888         <tr>
889           <td class="md" nowrap valign="top"> void Module::OnUserPostNick </td>
890           <td class="md" valign="top">(&nbsp;</td>
891           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
892           <td class="mdname" nowrap> <em>user</em>, </td>
893         </tr>
894         <tr>
895           <td></td>
896           <td></td>
897           <td class="md" nowrap>std::string&nbsp;</td>
898           <td class="mdname" nowrap> <em>oldnick</em></td>
899         </tr>
900         <tr>
901           <td></td>
902           <td class="md">)&nbsp;</td>
903           <td class="md" colspan="2"><code> [virtual]</code></td>
904         </tr>
905
906       </table>
907     </td>
908   </tr>
909 </table>
910 <table cellspacing=5 cellpadding=0 border=0>
911   <tr>
912     <td>
913       &nbsp;
914     </td>
915     <td>
916
917 <p>
918 Called after any nickchange, local or remote. 
919 <p>
920 This can be used to track users after nickchanges have been applied. 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). Because this method is called after the nickchange is taken place, no return values are possible to indicate forbidding of the nick change. Use OnUserPreNick for this. 
921 <p>
922 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>.
923 <p>
924 <div class="fragment"><pre>00326 { };
925 </pre></div>    </td>
926   </tr>
927 </table>
928 <a name="a16" doxytag="Module::OnUserPreInvite"></a><p>
929 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
930   <tr>
931     <td class="mdRow">
932       <table cellpadding="0" cellspacing="0" border="0">
933         <tr>
934           <td class="md" nowrap valign="top"> int Module::OnUserPreInvite </td>
935           <td class="md" valign="top">(&nbsp;</td>
936           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
937           <td class="mdname" nowrap> <em>source</em>, </td>
938         </tr>
939         <tr>
940           <td></td>
941           <td></td>
942           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
943           <td class="mdname" nowrap> <em>dest</em>, </td>
944         </tr>
945         <tr>
946           <td></td>
947           <td></td>
948           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
949           <td class="mdname" nowrap> <em>channel</em></td>
950         </tr>
951         <tr>
952           <td></td>
953           <td class="md">)&nbsp;</td>
954           <td class="md" colspan="2"><code> [virtual]</code></td>
955         </tr>
956
957       </table>
958     </td>
959   </tr>
960 </table>
961 <table cellspacing=5 cellpadding=0 border=0>
962   <tr>
963     <td>
964       &nbsp;
965     </td>
966     <td>
967
968 <p>
969 Called whenever a user is about to invite another user into a channel, before any processing is done. 
970 <p>
971 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.
972 <p>
973 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>.
974 <p>
975 <div class="fragment"><pre>00322 { <span class="keywordflow">return</span> 0; };
976 </pre></div>    </td>
977   </tr>
978 </table>
979 <a name="a12" doxytag="Module::OnUserPreJoin"></a><p>
980 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
981   <tr>
982     <td class="mdRow">
983       <table cellpadding="0" cellspacing="0" border="0">
984         <tr>
985           <td class="md" nowrap valign="top"> int Module::OnUserPreJoin </td>
986           <td class="md" valign="top">(&nbsp;</td>
987           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
988           <td class="mdname" nowrap> <em>user</em>, </td>
989         </tr>
990         <tr>
991           <td></td>
992           <td></td>
993           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
994           <td class="mdname" nowrap> <em>chan</em>, </td>
995         </tr>
996         <tr>
997           <td></td>
998           <td></td>
999           <td class="md" nowrap>const char *&nbsp;</td>
1000           <td class="mdname" nowrap> <em>cname</em></td>
1001         </tr>
1002         <tr>
1003           <td></td>
1004           <td class="md">)&nbsp;</td>
1005           <td class="md" colspan="2"><code> [virtual]</code></td>
1006         </tr>
1007
1008       </table>
1009     </td>
1010   </tr>
1011 </table>
1012 <table cellspacing=5 cellpadding=0 border=0>
1013   <tr>
1014     <td>
1015       &nbsp;
1016     </td>
1017     <td>
1018
1019 <p>
1020 Called whenever a user is about to join a channel, before any processing is done. 
1021 <p>
1022 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>
1023 IMPORTANT NOTE!<p>
1024 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.
1025 <p>
1026 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>.
1027 <p>
1028 <div class="fragment"><pre>00316 { <span class="keywordflow">return</span> 0; }
1029 </pre></div>    </td>
1030   </tr>
1031 </table>
1032 <a name="a17" doxytag="Module::OnUserPreMessage"></a><p>
1033 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1034   <tr>
1035     <td class="mdRow">
1036       <table cellpadding="0" cellspacing="0" border="0">
1037         <tr>
1038           <td class="md" nowrap valign="top"> int Module::OnUserPreMessage </td>
1039           <td class="md" valign="top">(&nbsp;</td>
1040           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1041           <td class="mdname" nowrap> <em>user</em>, </td>
1042         </tr>
1043         <tr>
1044           <td></td>
1045           <td></td>
1046           <td class="md" nowrap>void *&nbsp;</td>
1047           <td class="mdname" nowrap> <em>dest</em>, </td>
1048         </tr>
1049         <tr>
1050           <td></td>
1051           <td></td>
1052           <td class="md" nowrap>int&nbsp;</td>
1053           <td class="mdname" nowrap> <em>target_type</em>, </td>
1054         </tr>
1055         <tr>
1056           <td></td>
1057           <td></td>
1058           <td class="md" nowrap>std::string &amp;&nbsp;</td>
1059           <td class="mdname" nowrap> <em>text</em></td>
1060         </tr>
1061         <tr>
1062           <td></td>
1063           <td class="md">)&nbsp;</td>
1064           <td class="md" colspan="2"><code> [virtual]</code></td>
1065         </tr>
1066
1067       </table>
1068     </td>
1069   </tr>
1070 </table>
1071 <table cellspacing=5 cellpadding=0 border=0>
1072   <tr>
1073     <td>
1074       &nbsp;
1075     </td>
1076     <td>
1077
1078 <p>
1079 Called whenever a user is about to PRIVMSG A user or a channel, before any processing is done. 
1080 <p>
1081 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.
1082 <p>
1083 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>.
1084 <p>
1085 <div class="fragment"><pre>00323 { <span class="keywordflow">return</span> 0; };
1086 </pre></div>    </td>
1087   </tr>
1088 </table>
1089 <a name="a19" doxytag="Module::OnUserPreNick"></a><p>
1090 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1091   <tr>
1092     <td class="mdRow">
1093       <table cellpadding="0" cellspacing="0" border="0">
1094         <tr>
1095           <td class="md" nowrap valign="top"> int Module::OnUserPreNick </td>
1096           <td class="md" valign="top">(&nbsp;</td>
1097           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1098           <td class="mdname" nowrap> <em>user</em>, </td>
1099         </tr>
1100         <tr>
1101           <td></td>
1102           <td></td>
1103           <td class="md" nowrap>std::string&nbsp;</td>
1104           <td class="mdname" nowrap> <em>newnick</em></td>
1105         </tr>
1106         <tr>
1107           <td></td>
1108           <td class="md">)&nbsp;</td>
1109           <td class="md" colspan="2"><code> [virtual]</code></td>
1110         </tr>
1111
1112       </table>
1113     </td>
1114   </tr>
1115 </table>
1116 <table cellspacing=5 cellpadding=0 border=0>
1117   <tr>
1118     <td>
1119       &nbsp;
1120     </td>
1121     <td>
1122
1123 <p>
1124 Called before any nickchange, local or remote. 
1125 <p>
1126 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.
1127 <p>
1128 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>.
1129 <p>
1130 <div class="fragment"><pre>00325 { <span class="keywordflow">return</span> 0; };
1131 </pre></div>    </td>
1132   </tr>
1133 </table>
1134 <a name="a18" doxytag="Module::OnUserPreNotice"></a><p>
1135 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1136   <tr>
1137     <td class="mdRow">
1138       <table cellpadding="0" cellspacing="0" border="0">
1139         <tr>
1140           <td class="md" nowrap valign="top"> int Module::OnUserPreNotice </td>
1141           <td class="md" valign="top">(&nbsp;</td>
1142           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1143           <td class="mdname" nowrap> <em>user</em>, </td>
1144         </tr>
1145         <tr>
1146           <td></td>
1147           <td></td>
1148           <td class="md" nowrap>void *&nbsp;</td>
1149           <td class="mdname" nowrap> <em>dest</em>, </td>
1150         </tr>
1151         <tr>
1152           <td></td>
1153           <td></td>
1154           <td class="md" nowrap>int&nbsp;</td>
1155           <td class="mdname" nowrap> <em>target_type</em>, </td>
1156         </tr>
1157         <tr>
1158           <td></td>
1159           <td></td>
1160           <td class="md" nowrap>std::string &amp;&nbsp;</td>
1161           <td class="mdname" nowrap> <em>text</em></td>
1162         </tr>
1163         <tr>
1164           <td></td>
1165           <td class="md">)&nbsp;</td>
1166           <td class="md" colspan="2"><code> [virtual]</code></td>
1167         </tr>
1168
1169       </table>
1170     </td>
1171   </tr>
1172 </table>
1173 <table cellspacing=5 cellpadding=0 border=0>
1174   <tr>
1175     <td>
1176       &nbsp;
1177     </td>
1178     <td>
1179
1180 <p>
1181 Called whenever a user is about to NOTICE A user or a channel, before any processing is done. 
1182 <p>
1183 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.
1184 <p>
1185 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>.
1186 <p>
1187 <div class="fragment"><pre>00324 { <span class="keywordflow">return</span> 0; };
1188 </pre></div>    </td>
1189   </tr>
1190 </table>
1191 <a name="a4" doxytag="Module::OnUserQuit"></a><p>
1192 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1193   <tr>
1194     <td class="mdRow">
1195       <table cellpadding="0" cellspacing="0" border="0">
1196         <tr>
1197           <td class="md" nowrap valign="top"> void Module::OnUserQuit </td>
1198           <td class="md" valign="top">(&nbsp;</td>
1199           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1200           <td class="mdname1" valign="top" nowrap> <em>user</em>          </td>
1201           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1202           <td class="md" nowrap><code> [virtual]</code></td>
1203         </tr>
1204
1205       </table>
1206     </td>
1207   </tr>
1208 </table>
1209 <table cellspacing=5 cellpadding=0 border=0>
1210   <tr>
1211     <td>
1212       &nbsp;
1213     </td>
1214     <td>
1215
1216 <p>
1217 Called when a user quits. 
1218 <p>
1219 The details of the exiting user are available to you in the parameter userrec *user
1220 <p>
1221 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>.
1222 <p>
1223 <div class="fragment"><pre>00309 { }
1224 </pre></div>    </td>
1225   </tr>
1226 </table>
1227 <a name="a22" doxytag="Module::OnUserSync"></a><p>
1228 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1229   <tr>
1230     <td class="mdRow">
1231       <table cellpadding="0" cellspacing="0" border="0">
1232         <tr>
1233           <td class="md" nowrap valign="top"> <a class="el" href="modules_8h.html#a31">string_list</a> Module::OnUserSync </td>
1234           <td class="md" valign="top">(&nbsp;</td>
1235           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1236           <td class="mdname1" valign="top" nowrap> <em>user</em>          </td>
1237           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1238           <td class="md" nowrap><code> [virtual]</code></td>
1239         </tr>
1240
1241       </table>
1242     </td>
1243   </tr>
1244 </table>
1245 <table cellspacing=5 cellpadding=0 border=0>
1246   <tr>
1247     <td>
1248       &nbsp;
1249     </td>
1250     <td>
1251
1252 <p>
1253 Called during a netburst to sync user data. 
1254 <p>
1255 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.
1256 <p>
1257 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>.
1258 <p>
1259 References <a class="el" href="modules_8h-source.html#l00068">string_list</a>.
1260 <p>
1261 <div class="fragment"><pre>00328 { <a class="code" href="modules_8h.html#a31">string_list</a> empty; <span class="keywordflow">return</span> empty; }
1262 </pre></div>    </td>
1263   </tr>
1264 </table>
1265 <a name="a15" doxytag="Module::OnWhois"></a><p>
1266 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1267   <tr>
1268     <td class="mdRow">
1269       <table cellpadding="0" cellspacing="0" border="0">
1270         <tr>
1271           <td class="md" nowrap valign="top"> void Module::OnWhois </td>
1272           <td class="md" valign="top">(&nbsp;</td>
1273           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1274           <td class="mdname" nowrap> <em>source</em>, </td>
1275         </tr>
1276         <tr>
1277           <td></td>
1278           <td></td>
1279           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1280           <td class="mdname" nowrap> <em>dest</em></td>
1281         </tr>
1282         <tr>
1283           <td></td>
1284           <td class="md">)&nbsp;</td>
1285           <td class="md" colspan="2"><code> [virtual]</code></td>
1286         </tr>
1287
1288       </table>
1289     </td>
1290   </tr>
1291 </table>
1292 <table cellspacing=5 cellpadding=0 border=0>
1293   <tr>
1294     <td>
1295       &nbsp;
1296     </td>
1297     <td>
1298
1299 <p>
1300 Called whenever a /WHOIS is performed on a local user. 
1301 <p>
1302 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.
1303 <p>
1304 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>.
1305 <p>
1306 <div class="fragment"><pre>00321 { };
1307 </pre></div>    </td>
1308   </tr>
1309 </table>
1310 <hr>The documentation for this class was generated from the following files:<ul>
1311 <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>
1312 <hr size="1"><address style="align: right;"><small>Generated on Thu Apr 7 20:14:25 2005 for InspIRCd by
1313 <a href="http://www.doxygen.org/index.html">
1314 <img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
1315 </a>1.3.3 </small></address>
1316 </body>
1317 </html>