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