]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/classModule.html
Changed parameters of OnPacketTransmit and OnPacketReceive to be much more useful
[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> (std::string &amp;data, std::string serv)</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> (std::string &amp;data, std::string serv)</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">std::string &amp;&nbsp;</td>
608           <td class="mdname" nowrap> <em>data</em>, </td>
609         </tr>
610         <tr>
611           <td></td>
612           <td></td>
613           <td class="md" nowrap>std::string&nbsp;</td>
614           <td class="mdname" nowrap> <em>serv</em></td>
615         </tr>
616         <tr>
617           <td></td>
618           <td class="md">)&nbsp;</td>
619           <td class="md" colspan="2"><code> [virtual]</code></td>
620         </tr>
621
622       </table>
623     </td>
624   </tr>
625 </table>
626 <table cellspacing=5 cellpadding=0 border=0>
627   <tr>
628     <td>
629       &nbsp;
630     </td>
631     <td>
632
633 <p>
634 Called after a packet is received from another irc server. 
635 <p>
636 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.
637 <p>
638 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>.
639 <p>
640 <div class="fragment"><pre>00313 { }
641 </pre></div>    </td>
642   </tr>
643 </table>
644 <a name="a7" doxytag="Module::OnPacketTransmit"></a><p>
645 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
646   <tr>
647     <td class="mdRow">
648       <table cellpadding="0" cellspacing="0" border="0">
649         <tr>
650           <td class="md" nowrap valign="top"> void Module::OnPacketTransmit </td>
651           <td class="md" valign="top">(&nbsp;</td>
652           <td class="md" nowrap valign="top">std::string &amp;&nbsp;</td>
653           <td class="mdname" nowrap> <em>data</em>, </td>
654         </tr>
655         <tr>
656           <td></td>
657           <td></td>
658           <td class="md" nowrap>std::string&nbsp;</td>
659           <td class="mdname" nowrap> <em>serv</em></td>
660         </tr>
661         <tr>
662           <td></td>
663           <td class="md">)&nbsp;</td>
664           <td class="md" colspan="2"><code> [virtual]</code></td>
665         </tr>
666
667       </table>
668     </td>
669   </tr>
670 </table>
671 <table cellspacing=5 cellpadding=0 border=0>
672   <tr>
673     <td>
674       &nbsp;
675     </td>
676     <td>
677
678 <p>
679 Called before a packet is transmitted across the irc network between two irc servers. 
680 <p>
681 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.
682 <p>
683 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>.
684 <p>
685 <div class="fragment"><pre>00312 { }
686 </pre></div>    </td>
687   </tr>
688 </table>
689 <a name="a9" doxytag="Module::OnRehash"></a><p>
690 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
691   <tr>
692     <td class="mdRow">
693       <table cellpadding="0" cellspacing="0" border="0">
694         <tr>
695           <td class="md" nowrap valign="top"> void Module::OnRehash </td>
696           <td class="md" valign="top">(&nbsp;</td>
697           <td class="mdname1" valign="top" nowrap>          </td>
698           <td class="md" valign="top">&nbsp;)&nbsp;</td>
699           <td class="md" nowrap><code> [virtual]</code></td>
700         </tr>
701
702       </table>
703     </td>
704   </tr>
705 </table>
706 <table cellspacing=5 cellpadding=0 border=0>
707   <tr>
708     <td>
709       &nbsp;
710     </td>
711     <td>
712
713 <p>
714 Called on rehash. 
715 <p>
716 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.
717 <p>
718 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>.
719 <p>
720 <div class="fragment"><pre>00314 { }
721 </pre></div>    </td>
722   </tr>
723 </table>
724 <a name="a10" doxytag="Module::OnServerRaw"></a><p>
725 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
726   <tr>
727     <td class="mdRow">
728       <table cellpadding="0" cellspacing="0" border="0">
729         <tr>
730           <td class="md" nowrap valign="top"> void Module::OnServerRaw </td>
731           <td class="md" valign="top">(&nbsp;</td>
732           <td class="md" nowrap valign="top">std::string &amp;&nbsp;</td>
733           <td class="mdname" nowrap> <em>raw</em>, </td>
734         </tr>
735         <tr>
736           <td></td>
737           <td></td>
738           <td class="md" nowrap>bool&nbsp;</td>
739           <td class="mdname" nowrap> <em>inbound</em>, </td>
740         </tr>
741         <tr>
742           <td></td>
743           <td></td>
744           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
745           <td class="mdname" nowrap> <em>user</em></td>
746         </tr>
747         <tr>
748           <td></td>
749           <td class="md">)&nbsp;</td>
750           <td class="md" colspan="2"><code> [virtual]</code></td>
751         </tr>
752
753       </table>
754     </td>
755   </tr>
756 </table>
757 <table cellspacing=5 cellpadding=0 border=0>
758   <tr>
759     <td>
760       &nbsp;
761     </td>
762     <td>
763
764 <p>
765 Called when a raw command is transmitted or received. 
766 <p>
767 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.
768 <p>
769 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>.
770 <p>
771 <div class="fragment"><pre>00315 { }
772 </pre></div>    </td>
773   </tr>
774 </table>
775 <a name="a3" doxytag="Module::OnUserConnect"></a><p>
776 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
777   <tr>
778     <td class="mdRow">
779       <table cellpadding="0" cellspacing="0" border="0">
780         <tr>
781           <td class="md" nowrap valign="top"> void Module::OnUserConnect </td>
782           <td class="md" valign="top">(&nbsp;</td>
783           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
784           <td class="mdname1" valign="top" nowrap> <em>user</em>          </td>
785           <td class="md" valign="top">&nbsp;)&nbsp;</td>
786           <td class="md" nowrap><code> [virtual]</code></td>
787         </tr>
788
789       </table>
790     </td>
791   </tr>
792 </table>
793 <table cellspacing=5 cellpadding=0 border=0>
794   <tr>
795     <td>
796       &nbsp;
797     </td>
798     <td>
799
800 <p>
801 Called when a user connects. 
802 <p>
803 The details of the connecting user are available to you in the parameter userrec *user
804 <p>
805 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>.
806 <p>
807 <div class="fragment"><pre>00308 { }
808 </pre></div>    </td>
809   </tr>
810 </table>
811 <a name="a5" doxytag="Module::OnUserJoin"></a><p>
812 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
813   <tr>
814     <td class="mdRow">
815       <table cellpadding="0" cellspacing="0" border="0">
816         <tr>
817           <td class="md" nowrap valign="top"> void Module::OnUserJoin </td>
818           <td class="md" valign="top">(&nbsp;</td>
819           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
820           <td class="mdname" nowrap> <em>user</em>, </td>
821         </tr>
822         <tr>
823           <td></td>
824           <td></td>
825           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
826           <td class="mdname" nowrap> <em>channel</em></td>
827         </tr>
828         <tr>
829           <td></td>
830           <td class="md">)&nbsp;</td>
831           <td class="md" colspan="2"><code> [virtual]</code></td>
832         </tr>
833
834       </table>
835     </td>
836   </tr>
837 </table>
838 <table cellspacing=5 cellpadding=0 border=0>
839   <tr>
840     <td>
841       &nbsp;
842     </td>
843     <td>
844
845 <p>
846 Called when a user joins a channel. 
847 <p>
848 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
849 <p>
850 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>.
851 <p>
852 <div class="fragment"><pre>00310 { }
853 </pre></div>    </td>
854   </tr>
855 </table>
856 <a name="a6" doxytag="Module::OnUserPart"></a><p>
857 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
858   <tr>
859     <td class="mdRow">
860       <table cellpadding="0" cellspacing="0" border="0">
861         <tr>
862           <td class="md" nowrap valign="top"> void Module::OnUserPart </td>
863           <td class="md" valign="top">(&nbsp;</td>
864           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
865           <td class="mdname" nowrap> <em>user</em>, </td>
866         </tr>
867         <tr>
868           <td></td>
869           <td></td>
870           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
871           <td class="mdname" nowrap> <em>channel</em></td>
872         </tr>
873         <tr>
874           <td></td>
875           <td class="md">)&nbsp;</td>
876           <td class="md" colspan="2"><code> [virtual]</code></td>
877         </tr>
878
879       </table>
880     </td>
881   </tr>
882 </table>
883 <table cellspacing=5 cellpadding=0 border=0>
884   <tr>
885     <td>
886       &nbsp;
887     </td>
888     <td>
889
890 <p>
891 Called when a user parts a channel. 
892 <p>
893 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
894 <p>
895 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>.
896 <p>
897 <div class="fragment"><pre>00311 { }
898 </pre></div>    </td>
899   </tr>
900 </table>
901 <a name="a20" doxytag="Module::OnUserPostNick"></a><p>
902 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
903   <tr>
904     <td class="mdRow">
905       <table cellpadding="0" cellspacing="0" border="0">
906         <tr>
907           <td class="md" nowrap valign="top"> void Module::OnUserPostNick </td>
908           <td class="md" valign="top">(&nbsp;</td>
909           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
910           <td class="mdname" nowrap> <em>user</em>, </td>
911         </tr>
912         <tr>
913           <td></td>
914           <td></td>
915           <td class="md" nowrap>std::string&nbsp;</td>
916           <td class="mdname" nowrap> <em>oldnick</em></td>
917         </tr>
918         <tr>
919           <td></td>
920           <td class="md">)&nbsp;</td>
921           <td class="md" colspan="2"><code> [virtual]</code></td>
922         </tr>
923
924       </table>
925     </td>
926   </tr>
927 </table>
928 <table cellspacing=5 cellpadding=0 border=0>
929   <tr>
930     <td>
931       &nbsp;
932     </td>
933     <td>
934
935 <p>
936 Called after any nickchange, local or remote. 
937 <p>
938 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. 
939 <p>
940 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>.
941 <p>
942 <div class="fragment"><pre>00326 { };
943 </pre></div>    </td>
944   </tr>
945 </table>
946 <a name="a16" doxytag="Module::OnUserPreInvite"></a><p>
947 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
948   <tr>
949     <td class="mdRow">
950       <table cellpadding="0" cellspacing="0" border="0">
951         <tr>
952           <td class="md" nowrap valign="top"> int Module::OnUserPreInvite </td>
953           <td class="md" valign="top">(&nbsp;</td>
954           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
955           <td class="mdname" nowrap> <em>source</em>, </td>
956         </tr>
957         <tr>
958           <td></td>
959           <td></td>
960           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
961           <td class="mdname" nowrap> <em>dest</em>, </td>
962         </tr>
963         <tr>
964           <td></td>
965           <td></td>
966           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
967           <td class="mdname" nowrap> <em>channel</em></td>
968         </tr>
969         <tr>
970           <td></td>
971           <td class="md">)&nbsp;</td>
972           <td class="md" colspan="2"><code> [virtual]</code></td>
973         </tr>
974
975       </table>
976     </td>
977   </tr>
978 </table>
979 <table cellspacing=5 cellpadding=0 border=0>
980   <tr>
981     <td>
982       &nbsp;
983     </td>
984     <td>
985
986 <p>
987 Called whenever a user is about to invite another user into a channel, before any processing is done. 
988 <p>
989 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.
990 <p>
991 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>.
992 <p>
993 <div class="fragment"><pre>00322 { <span class="keywordflow">return</span> 0; };
994 </pre></div>    </td>
995   </tr>
996 </table>
997 <a name="a12" doxytag="Module::OnUserPreJoin"></a><p>
998 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
999   <tr>
1000     <td class="mdRow">
1001       <table cellpadding="0" cellspacing="0" border="0">
1002         <tr>
1003           <td class="md" nowrap valign="top"> int Module::OnUserPreJoin </td>
1004           <td class="md" valign="top">(&nbsp;</td>
1005           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1006           <td class="mdname" nowrap> <em>user</em>, </td>
1007         </tr>
1008         <tr>
1009           <td></td>
1010           <td></td>
1011           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
1012           <td class="mdname" nowrap> <em>chan</em>, </td>
1013         </tr>
1014         <tr>
1015           <td></td>
1016           <td></td>
1017           <td class="md" nowrap>const char *&nbsp;</td>
1018           <td class="mdname" nowrap> <em>cname</em></td>
1019         </tr>
1020         <tr>
1021           <td></td>
1022           <td class="md">)&nbsp;</td>
1023           <td class="md" colspan="2"><code> [virtual]</code></td>
1024         </tr>
1025
1026       </table>
1027     </td>
1028   </tr>
1029 </table>
1030 <table cellspacing=5 cellpadding=0 border=0>
1031   <tr>
1032     <td>
1033       &nbsp;
1034     </td>
1035     <td>
1036
1037 <p>
1038 Called whenever a user is about to join a channel, before any processing is done. 
1039 <p>
1040 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>
1041 IMPORTANT NOTE!<p>
1042 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.
1043 <p>
1044 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>.
1045 <p>
1046 <div class="fragment"><pre>00316 { <span class="keywordflow">return</span> 0; }
1047 </pre></div>    </td>
1048   </tr>
1049 </table>
1050 <a name="a17" doxytag="Module::OnUserPreMessage"></a><p>
1051 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1052   <tr>
1053     <td class="mdRow">
1054       <table cellpadding="0" cellspacing="0" border="0">
1055         <tr>
1056           <td class="md" nowrap valign="top"> int Module::OnUserPreMessage </td>
1057           <td class="md" valign="top">(&nbsp;</td>
1058           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1059           <td class="mdname" nowrap> <em>user</em>, </td>
1060         </tr>
1061         <tr>
1062           <td></td>
1063           <td></td>
1064           <td class="md" nowrap>void *&nbsp;</td>
1065           <td class="mdname" nowrap> <em>dest</em>, </td>
1066         </tr>
1067         <tr>
1068           <td></td>
1069           <td></td>
1070           <td class="md" nowrap>int&nbsp;</td>
1071           <td class="mdname" nowrap> <em>target_type</em>, </td>
1072         </tr>
1073         <tr>
1074           <td></td>
1075           <td></td>
1076           <td class="md" nowrap>std::string &amp;&nbsp;</td>
1077           <td class="mdname" nowrap> <em>text</em></td>
1078         </tr>
1079         <tr>
1080           <td></td>
1081           <td class="md">)&nbsp;</td>
1082           <td class="md" colspan="2"><code> [virtual]</code></td>
1083         </tr>
1084
1085       </table>
1086     </td>
1087   </tr>
1088 </table>
1089 <table cellspacing=5 cellpadding=0 border=0>
1090   <tr>
1091     <td>
1092       &nbsp;
1093     </td>
1094     <td>
1095
1096 <p>
1097 Called whenever a user is about to PRIVMSG A user or a channel, before any processing is done. 
1098 <p>
1099 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.
1100 <p>
1101 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>.
1102 <p>
1103 <div class="fragment"><pre>00323 { <span class="keywordflow">return</span> 0; };
1104 </pre></div>    </td>
1105   </tr>
1106 </table>
1107 <a name="a19" doxytag="Module::OnUserPreNick"></a><p>
1108 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1109   <tr>
1110     <td class="mdRow">
1111       <table cellpadding="0" cellspacing="0" border="0">
1112         <tr>
1113           <td class="md" nowrap valign="top"> int Module::OnUserPreNick </td>
1114           <td class="md" valign="top">(&nbsp;</td>
1115           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1116           <td class="mdname" nowrap> <em>user</em>, </td>
1117         </tr>
1118         <tr>
1119           <td></td>
1120           <td></td>
1121           <td class="md" nowrap>std::string&nbsp;</td>
1122           <td class="mdname" nowrap> <em>newnick</em></td>
1123         </tr>
1124         <tr>
1125           <td></td>
1126           <td class="md">)&nbsp;</td>
1127           <td class="md" colspan="2"><code> [virtual]</code></td>
1128         </tr>
1129
1130       </table>
1131     </td>
1132   </tr>
1133 </table>
1134 <table cellspacing=5 cellpadding=0 border=0>
1135   <tr>
1136     <td>
1137       &nbsp;
1138     </td>
1139     <td>
1140
1141 <p>
1142 Called before any nickchange, local or remote. 
1143 <p>
1144 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.
1145 <p>
1146 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>.
1147 <p>
1148 <div class="fragment"><pre>00325 { <span class="keywordflow">return</span> 0; };
1149 </pre></div>    </td>
1150   </tr>
1151 </table>
1152 <a name="a18" doxytag="Module::OnUserPreNotice"></a><p>
1153 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1154   <tr>
1155     <td class="mdRow">
1156       <table cellpadding="0" cellspacing="0" border="0">
1157         <tr>
1158           <td class="md" nowrap valign="top"> int Module::OnUserPreNotice </td>
1159           <td class="md" valign="top">(&nbsp;</td>
1160           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1161           <td class="mdname" nowrap> <em>user</em>, </td>
1162         </tr>
1163         <tr>
1164           <td></td>
1165           <td></td>
1166           <td class="md" nowrap>void *&nbsp;</td>
1167           <td class="mdname" nowrap> <em>dest</em>, </td>
1168         </tr>
1169         <tr>
1170           <td></td>
1171           <td></td>
1172           <td class="md" nowrap>int&nbsp;</td>
1173           <td class="mdname" nowrap> <em>target_type</em>, </td>
1174         </tr>
1175         <tr>
1176           <td></td>
1177           <td></td>
1178           <td class="md" nowrap>std::string &amp;&nbsp;</td>
1179           <td class="mdname" nowrap> <em>text</em></td>
1180         </tr>
1181         <tr>
1182           <td></td>
1183           <td class="md">)&nbsp;</td>
1184           <td class="md" colspan="2"><code> [virtual]</code></td>
1185         </tr>
1186
1187       </table>
1188     </td>
1189   </tr>
1190 </table>
1191 <table cellspacing=5 cellpadding=0 border=0>
1192   <tr>
1193     <td>
1194       &nbsp;
1195     </td>
1196     <td>
1197
1198 <p>
1199 Called whenever a user is about to NOTICE A user or a channel, before any processing is done. 
1200 <p>
1201 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.
1202 <p>
1203 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>.
1204 <p>
1205 <div class="fragment"><pre>00324 { <span class="keywordflow">return</span> 0; };
1206 </pre></div>    </td>
1207   </tr>
1208 </table>
1209 <a name="a4" doxytag="Module::OnUserQuit"></a><p>
1210 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1211   <tr>
1212     <td class="mdRow">
1213       <table cellpadding="0" cellspacing="0" border="0">
1214         <tr>
1215           <td class="md" nowrap valign="top"> void Module::OnUserQuit </td>
1216           <td class="md" valign="top">(&nbsp;</td>
1217           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1218           <td class="mdname1" valign="top" nowrap> <em>user</em>          </td>
1219           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1220           <td class="md" nowrap><code> [virtual]</code></td>
1221         </tr>
1222
1223       </table>
1224     </td>
1225   </tr>
1226 </table>
1227 <table cellspacing=5 cellpadding=0 border=0>
1228   <tr>
1229     <td>
1230       &nbsp;
1231     </td>
1232     <td>
1233
1234 <p>
1235 Called when a user quits. 
1236 <p>
1237 The details of the exiting user are available to you in the parameter userrec *user
1238 <p>
1239 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>.
1240 <p>
1241 <div class="fragment"><pre>00309 { }
1242 </pre></div>    </td>
1243   </tr>
1244 </table>
1245 <a name="a22" doxytag="Module::OnUserSync"></a><p>
1246 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1247   <tr>
1248     <td class="mdRow">
1249       <table cellpadding="0" cellspacing="0" border="0">
1250         <tr>
1251           <td class="md" nowrap valign="top"> <a class="el" href="modules_8h.html#a31">string_list</a> Module::OnUserSync </td>
1252           <td class="md" valign="top">(&nbsp;</td>
1253           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1254           <td class="mdname1" valign="top" nowrap> <em>user</em>          </td>
1255           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1256           <td class="md" nowrap><code> [virtual]</code></td>
1257         </tr>
1258
1259       </table>
1260     </td>
1261   </tr>
1262 </table>
1263 <table cellspacing=5 cellpadding=0 border=0>
1264   <tr>
1265     <td>
1266       &nbsp;
1267     </td>
1268     <td>
1269
1270 <p>
1271 Called during a netburst to sync user data. 
1272 <p>
1273 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.
1274 <p>
1275 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>.
1276 <p>
1277 References <a class="el" href="modules_8h-source.html#l00068">string_list</a>.
1278 <p>
1279 <div class="fragment"><pre>00328 { <a class="code" href="modules_8h.html#a31">string_list</a> empty; <span class="keywordflow">return</span> empty; }
1280 </pre></div>    </td>
1281   </tr>
1282 </table>
1283 <a name="a15" doxytag="Module::OnWhois"></a><p>
1284 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1285   <tr>
1286     <td class="mdRow">
1287       <table cellpadding="0" cellspacing="0" border="0">
1288         <tr>
1289           <td class="md" nowrap valign="top"> void Module::OnWhois </td>
1290           <td class="md" valign="top">(&nbsp;</td>
1291           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1292           <td class="mdname" nowrap> <em>source</em>, </td>
1293         </tr>
1294         <tr>
1295           <td></td>
1296           <td></td>
1297           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1298           <td class="mdname" nowrap> <em>dest</em></td>
1299         </tr>
1300         <tr>
1301           <td></td>
1302           <td class="md">)&nbsp;</td>
1303           <td class="md" colspan="2"><code> [virtual]</code></td>
1304         </tr>
1305
1306       </table>
1307     </td>
1308   </tr>
1309 </table>
1310 <table cellspacing=5 cellpadding=0 border=0>
1311   <tr>
1312     <td>
1313       &nbsp;
1314     </td>
1315     <td>
1316
1317 <p>
1318 Called whenever a /WHOIS is performed on a local user. 
1319 <p>
1320 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.
1321 <p>
1322 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>.
1323 <p>
1324 <div class="fragment"><pre>00321 { };
1325 </pre></div>    </td>
1326   </tr>
1327 </table>
1328 <hr>The documentation for this class was generated from the following files:<ul>
1329 <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>
1330 <hr size="1"><address style="align: right;"><small>Generated on Sat Apr 9 14:38:29 2005 for InspIRCd by
1331 <a href="http://www.doxygen.org/index.html">
1332 <img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
1333 </a>1.3.3 </small></address>
1334 </body>
1335 </html>