]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/classModule.html
New documentation on today's new methods etc
[user/henk/code/inspircd.git] / docs / module-doc / classModule.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3 <title>InspIRCd: Module class Reference</title>
4 <link href="inspircd.css" rel="stylesheet" type="text/css">
5 </head><body>
6 <!-- Generated by Doxygen 1.3.3 -->
7 <div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Compound&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Compound&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
8 <h1>Module Class Reference</h1>Base class for all InspIRCd modules This class is the base class for InspIRCd modules.  
9 <a href="#_details">More...</a>
10 <p>
11 <code>#include &lt;<a class="el" href="modules_8h-source.html">modules.h</a>&gt;</code>
12 <p>
13 Inherits <a class="el" href="classclassbase.html">classbase</a>.
14 <p>
15 <a href="classModule-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
16 <tr><td></td></tr>
17 <tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
18 <tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a0">Module</a> ()</td></tr>
19
20 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor creates a module class. </em> <a href="#a0"></a><em><br><br></td></tr>
21 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a1">~Module</a> ()</td></tr>
22
23 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default destructor destroys a module class. </em> <a href="#a1"></a><em><br><br></td></tr>
24 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="classVersion.html">Version</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a2">GetVersion</a> ()</td></tr>
25
26 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the version number of a Module. </em> <a href="#a2"></a><em><br><br></td></tr>
27 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a3">OnUserConnect</a> (<a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
28
29 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called when a user connects. </em> <a href="#a3"></a><em><br><br></td></tr>
30 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a4">OnUserQuit</a> (<a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
31
32 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called when a user quits. </em> <a href="#a4"></a><em><br><br></td></tr>
33 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a5">OnUserJoin</a> (<a class="el" href="classuserrec.html">userrec</a> *user, <a class="el" href="classchanrec.html">chanrec</a> *channel)</td></tr>
34
35 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called when a user joins a channel. </em> <a href="#a5"></a><em><br><br></td></tr>
36 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a6">OnUserPart</a> (<a class="el" href="classuserrec.html">userrec</a> *user, <a class="el" href="classchanrec.html">chanrec</a> *channel)</td></tr>
37
38 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called when a user parts a channel. </em> <a href="#a6"></a><em><br><br></td></tr>
39 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a7">OnPacketTransmit</a> (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#a32">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 int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a13">OnUserPreKick</a> (<a class="el" href="classuserrec.html">userrec</a> *source, <a class="el" href="classuserrec.html">userrec</a> *user, <a class="el" href="classchanrec.html">chanrec</a> *chan, std::string reason)</td></tr>
58
59 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called whenever a user is about to be kicked. </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">OnUserKick</a> (<a class="el" href="classuserrec.html">userrec</a> *source, <a class="el" href="classuserrec.html">userrec</a> *user, <a class="el" href="classchanrec.html">chanrec</a> *chan, std::string reason)</td></tr>
61
62 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called whenever a user is kicked. </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">OnOper</a> (<a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
64
65 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called whenever a user opers locally. </em> <a href="#a15"></a><em><br><br></td></tr>
66 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a16">OnInfo</a> (<a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
67
68 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called whenever a user types /INFO. </em> <a href="#a16"></a><em><br><br></td></tr>
69 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a17">OnWhois</a> (<a class="el" href="classuserrec.html">userrec</a> *source, <a class="el" href="classuserrec.html">userrec</a> *dest)</td></tr>
70
71 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called whenever a /WHOIS is performed on a local user. </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">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>
73
74 <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="#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">OnUserPreMessage</a> (<a class="el" href="classuserrec.html">userrec</a> *user, void *dest, int target_type, std::string &amp;text)</td></tr>
76
77 <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="#a19"></a><em><br><br></td></tr>
78 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a20">OnUserPreNotice</a> (<a class="el" href="classuserrec.html">userrec</a> *user, void *dest, int target_type, std::string &amp;text)</td></tr>
79
80 <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="#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">OnUserPreNick</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string newnick)</td></tr>
82
83 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called before any nickchange, local or remote. </em> <a href="#a21"></a><em><br><br></td></tr>
84 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a22">OnUserPostNick</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string oldnick)</td></tr>
85
86 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called after any nickchange, local or remote. </em> <a href="#a22"></a><em><br><br></td></tr>
87 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a23">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>
88
89 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called before an action which requires a channel privilage check. </em> <a href="#a23"></a><em><br><br></td></tr>
90 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="modules_8h.html#a32">string_list</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a24">OnUserSync</a> (<a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
91
92 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called during a netburst to sync user data. </em> <a href="#a24"></a><em><br><br></td></tr>
93 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="modules_8h.html#a32">string_list</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a25">OnChannelSync</a> (<a class="el" href="classchanrec.html">chanrec</a> *chan)</td></tr>
94
95 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called during a netburst to sync channel data. </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">On005Numeric</a> (std::string &amp;output)</td></tr>
97
98 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called when a 005 numeric is about to be output. </em> <a href="#a26"></a><em><br><br></td></tr>
99 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a27">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>
100
101 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called when a client is disconnected by KILL. </em> <a href="#a27"></a><em><br><br></td></tr>
102 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a28">OnLoadModule</a> (<a class="el" href="classModule.html">Module</a> *mod, std::string name)</td></tr>
103
104 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called whenever a module is loaded. </em> <a href="#a28"></a><em><br><br></td></tr>
105 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a29">OnBackgroundTimer</a> (time_t curtime)</td></tr>
106
107 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called once every five seconds for background processing. </em> <a href="#a29"></a><em><br><br></td></tr>
108 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a30">OnSendList</a> (<a class="el" href="classuserrec.html">userrec</a> *user, <a class="el" href="classchanrec.html">chanrec</a> *channel, char mode)</td></tr>
109
110 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called whenever a list is needed for a listmode. </em> <a href="#a30"></a><em><br><br></td></tr>
111 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a31">OnPreCommand</a> (std::string command, char **parameters, int pcnt, <a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
112
113 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called whenever any command is about to be executed. </em> <a href="#a31"></a><em><br><br></td></tr>
114 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a32">OnCheckReady</a> (<a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
115
116 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called to check if a user who is connecting can now be allowed to register If any modules return false for this function, the user is held in the waiting state until all modules return true. </em> <a href="#a32"></a><em><br><br></td></tr>
117 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a33">OnUserRegister</a> (<a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
118
119 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called whenever a user is about to register their connection (e.g. </em> <a href="#a33"></a><em><br><br></td></tr>
120 </table>
121 <hr><a name="_details"></a><h2>Detailed Description</h2>
122 Base class for all InspIRCd modules This class is the base class for InspIRCd modules. 
123 <p>
124 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. 
125 <p>
126
127 <p>
128 Definition at line <a class="el" href="modules_8h-source.html#l00135">135</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
129 <a name="a0" doxytag="Module::Module"></a><p>
130 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
131   <tr>
132     <td class="mdRow">
133       <table cellpadding="0" cellspacing="0" border="0">
134         <tr>
135           <td class="md" nowrap valign="top"> Module::Module </td>
136           <td class="md" valign="top">(&nbsp;</td>
137           <td class="mdname1" valign="top" nowrap>          </td>
138           <td class="md" valign="top">&nbsp;)&nbsp;</td>
139           <td class="md" nowrap></td>
140         </tr>
141
142       </table>
143     </td>
144   </tr>
145 </table>
146 <table cellspacing=5 cellpadding=0 border=0>
147   <tr>
148     <td>
149       &nbsp;
150     </td>
151     <td>
152
153 <p>
154 Default constructor creates a module class. 
155 <p>
156
157 <p>
158 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>.
159 <p>
160 <div class="fragment"><pre>00306 { }
161 </pre></div>    </td>
162   </tr>
163 </table>
164 <a name="a1" doxytag="Module::~Module"></a><p>
165 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
166   <tr>
167     <td class="mdRow">
168       <table cellpadding="0" cellspacing="0" border="0">
169         <tr>
170           <td class="md" nowrap valign="top"> Module::~<a class="el" href="classModule.html">Module</a> </td>
171           <td class="md" valign="top">(&nbsp;</td>
172           <td class="mdname1" valign="top" nowrap>          </td>
173           <td class="md" valign="top">&nbsp;)&nbsp;</td>
174           <td class="md" nowrap><code> [virtual]</code></td>
175         </tr>
176
177       </table>
178     </td>
179   </tr>
180 </table>
181 <table cellspacing=5 cellpadding=0 border=0>
182   <tr>
183     <td>
184       &nbsp;
185     </td>
186     <td>
187
188 <p>
189 Default destructor destroys a module class. 
190 <p>
191
192 <p>
193 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>.
194 <p>
195 <div class="fragment"><pre>00307 { }
196 </pre></div>    </td>
197   </tr>
198 </table>
199 <hr><h2>Member Function Documentation</h2>
200 <a name="a2" doxytag="Module::GetVersion"></a><p>
201 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
202   <tr>
203     <td class="mdRow">
204       <table cellpadding="0" cellspacing="0" border="0">
205         <tr>
206           <td class="md" nowrap valign="top"> <a class="el" href="classVersion.html">Version</a> Module::GetVersion </td>
207           <td class="md" valign="top">(&nbsp;</td>
208           <td class="mdname1" valign="top" nowrap>          </td>
209           <td class="md" valign="top">&nbsp;)&nbsp;</td>
210           <td class="md" nowrap><code> [virtual]</code></td>
211         </tr>
212
213       </table>
214     </td>
215   </tr>
216 </table>
217 <table cellspacing=5 cellpadding=0 border=0>
218   <tr>
219     <td>
220       &nbsp;
221     </td>
222     <td>
223
224 <p>
225 Returns the version number of a Module. 
226 <p>
227 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>
228 <p>
229 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>.
230 <p>
231 References <a class="el" href="modules_8h-source.html#l00054">VF_VENDOR</a>.
232 <p>
233 <div class="fragment"><pre>00318 { <span class="keywordflow">return</span> <a class="code" href="classVersion.html">Version</a>(1,0,0,0,VF_VENDOR); }
234 </pre></div>    </td>
235   </tr>
236 </table>
237 <a name="a26" doxytag="Module::On005Numeric"></a><p>
238 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
239   <tr>
240     <td class="mdRow">
241       <table cellpadding="0" cellspacing="0" border="0">
242         <tr>
243           <td class="md" nowrap valign="top"> void Module::On005Numeric </td>
244           <td class="md" valign="top">(&nbsp;</td>
245           <td class="md" nowrap valign="top">std::string &amp;&nbsp;</td>
246           <td class="mdname1" valign="top" nowrap> <em>output</em>          </td>
247           <td class="md" valign="top">&nbsp;)&nbsp;</td>
248           <td class="md" nowrap><code> [virtual]</code></td>
249         </tr>
250
251       </table>
252     </td>
253   </tr>
254 </table>
255 <table cellspacing=5 cellpadding=0 border=0>
256   <tr>
257     <td>
258       &nbsp;
259     </td>
260     <td>
261
262 <p>
263 Called when a 005 numeric is about to be output. 
264 <p>
265 The module should modify the 005 numeric if needed to indicate its features.
266 <p>
267 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>.
268 <p>
269 <div class="fragment"><pre>00330 { };
270 </pre></div>    </td>
271   </tr>
272 </table>
273 <a name="a23" doxytag="Module::OnAccessCheck"></a><p>
274 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
275   <tr>
276     <td class="mdRow">
277       <table cellpadding="0" cellspacing="0" border="0">
278         <tr>
279           <td class="md" nowrap valign="top"> int Module::OnAccessCheck </td>
280           <td class="md" valign="top">(&nbsp;</td>
281           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
282           <td class="mdname" nowrap> <em>source</em>, </td>
283         </tr>
284         <tr>
285           <td></td>
286           <td></td>
287           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
288           <td class="mdname" nowrap> <em>dest</em>, </td>
289         </tr>
290         <tr>
291           <td></td>
292           <td></td>
293           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
294           <td class="mdname" nowrap> <em>channel</em>, </td>
295         </tr>
296         <tr>
297           <td></td>
298           <td></td>
299           <td class="md" nowrap>int&nbsp;</td>
300           <td class="mdname" nowrap> <em>access_type</em></td>
301         </tr>
302         <tr>
303           <td></td>
304           <td class="md">)&nbsp;</td>
305           <td class="md" colspan="2"><code> [virtual]</code></td>
306         </tr>
307
308       </table>
309     </td>
310   </tr>
311 </table>
312 <table cellspacing=5 cellpadding=0 border=0>
313   <tr>
314     <td>
315       &nbsp;
316     </td>
317     <td>
318
319 <p>
320 Called before an action which requires a channel privilage check. 
321 <p>
322 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>
323 <br>
324  AC_KICK (0) - A user is being kicked<br>
325  AC_DEOP (1) - a user is being deopped<br>
326  AC_OP (2) - a user is being opped<br>
327  AC_VOICE (3) - a user is being voiced<br>
328  AC_DEVOICE (4) - a user is being devoiced<br>
329  AC_HALFOP (5) - a user is being halfopped<br>
330  AC_DEHALFOP (6) - a user is being dehalfopped<br>
331  AC_INVITE (7) - a user is being invited<br>
332  AC_GENERAL_MODE (8) - a user channel mode is being changed<br>
333 <br>
334  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).
335 <p>
336 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>.
337 <p>
338 References <a class="el" href="modules_8h-source.html#l00037">ACR_DEFAULT</a>.
339 <p>
340 <div class="fragment"><pre>00327 { <span class="keywordflow">return</span> <a class="code" href="modules_8h.html#a8">ACR_DEFAULT</a>; };
341 </pre></div>    </td>
342   </tr>
343 </table>
344 <a name="a29" doxytag="Module::OnBackgroundTimer"></a><p>
345 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
346   <tr>
347     <td class="mdRow">
348       <table cellpadding="0" cellspacing="0" border="0">
349         <tr>
350           <td class="md" nowrap valign="top"> void Module::OnBackgroundTimer </td>
351           <td class="md" valign="top">(&nbsp;</td>
352           <td class="md" nowrap valign="top">time_t&nbsp;</td>
353           <td class="mdname1" valign="top" nowrap> <em>curtime</em>          </td>
354           <td class="md" valign="top">&nbsp;)&nbsp;</td>
355           <td class="md" nowrap><code> [virtual]</code></td>
356         </tr>
357
358       </table>
359     </td>
360   </tr>
361 </table>
362 <table cellspacing=5 cellpadding=0 border=0>
363   <tr>
364     <td>
365       &nbsp;
366     </td>
367     <td>
368
369 <p>
370 Called once every five seconds for background processing. 
371 <p>
372 This timer can be used to control timed features. Its period is not accurate enough to be used as a clock, but it is gauranteed to be called at least once in any five second period, directly from the main loop of the server.
373 <p>
374 Definition at line <a class="el" href="modules_8cpp-source.html#l00333">333</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
375 <p>
376 <div class="fragment"><pre>00333 { };
377 </pre></div>    </td>
378   </tr>
379 </table>
380 <a name="a25" doxytag="Module::OnChannelSync"></a><p>
381 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
382   <tr>
383     <td class="mdRow">
384       <table cellpadding="0" cellspacing="0" border="0">
385         <tr>
386           <td class="md" nowrap valign="top"> <a class="el" href="modules_8h.html#a32">string_list</a> Module::OnChannelSync </td>
387           <td class="md" valign="top">(&nbsp;</td>
388           <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
389           <td class="mdname1" valign="top" nowrap> <em>chan</em>          </td>
390           <td class="md" valign="top">&nbsp;)&nbsp;</td>
391           <td class="md" nowrap><code> [virtual]</code></td>
392         </tr>
393
394       </table>
395     </td>
396   </tr>
397 </table>
398 <table cellspacing=5 cellpadding=0 border=0>
399   <tr>
400     <td>
401       &nbsp;
402     </td>
403     <td>
404
405 <p>
406 Called during a netburst to sync channel data. 
407 <p>
408 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.
409 <p>
410 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>.
411 <p>
412 References <a class="el" href="modules_8h-source.html#l00068">string_list</a>.
413 <p>
414 <div class="fragment"><pre>00329 { <a class="code" href="modules_8h.html#a32">string_list</a> empty; <span class="keywordflow">return</span> empty; }
415 </pre></div>    </td>
416   </tr>
417 </table>
418 <a name="a32" doxytag="Module::OnCheckReady"></a><p>
419 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
420   <tr>
421     <td class="mdRow">
422       <table cellpadding="0" cellspacing="0" border="0">
423         <tr>
424           <td class="md" nowrap valign="top"> bool Module::OnCheckReady </td>
425           <td class="md" valign="top">(&nbsp;</td>
426           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
427           <td class="mdname1" valign="top" nowrap> <em>user</em>          </td>
428           <td class="md" valign="top">&nbsp;)&nbsp;</td>
429           <td class="md" nowrap><code> [virtual]</code></td>
430         </tr>
431
432       </table>
433     </td>
434   </tr>
435 </table>
436 <table cellspacing=5 cellpadding=0 border=0>
437   <tr>
438     <td>
439       &nbsp;
440     </td>
441     <td>
442
443 <p>
444 Called to check if a user who is connecting can now be allowed to register If any modules return false for this function, the user is held in the waiting state until all modules return true. 
445 <p>
446 For example a module which implements ident lookups will continue to return false for a user until their ident lookup is completed. Note that the registration timeout for a user overrides these checks, if the registration timeout is reached, the user is disconnected even if modules report that the user is not ready to connect.
447 <p>
448 Definition at line <a class="el" href="modules_8cpp-source.html#l00336">336</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
449 <p>
450 <div class="fragment"><pre>00336 { <span class="keywordflow">return</span> <span class="keyword">true</span>; };
451 </pre></div>    </td>
452   </tr>
453 </table>
454 <a name="a11" doxytag="Module::OnExtendedMode"></a><p>
455 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
456   <tr>
457     <td class="mdRow">
458       <table cellpadding="0" cellspacing="0" border="0">
459         <tr>
460           <td class="md" nowrap valign="top"> int Module::OnExtendedMode </td>
461           <td class="md" valign="top">(&nbsp;</td>
462           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
463           <td class="mdname" nowrap> <em>user</em>, </td>
464         </tr>
465         <tr>
466           <td></td>
467           <td></td>
468           <td class="md" nowrap>void *&nbsp;</td>
469           <td class="mdname" nowrap> <em>target</em>, </td>
470         </tr>
471         <tr>
472           <td></td>
473           <td></td>
474           <td class="md" nowrap>char&nbsp;</td>
475           <td class="mdname" nowrap> <em>modechar</em>, </td>
476         </tr>
477         <tr>
478           <td></td>
479           <td></td>
480           <td class="md" nowrap>int&nbsp;</td>
481           <td class="mdname" nowrap> <em>type</em>, </td>
482         </tr>
483         <tr>
484           <td></td>
485           <td></td>
486           <td class="md" nowrap>bool&nbsp;</td>
487           <td class="mdname" nowrap> <em>mode_on</em>, </td>
488         </tr>
489         <tr>
490           <td></td>
491           <td></td>
492           <td class="md" nowrap><a class="el" href="modules_8h.html#a32">string_list</a> &amp;&nbsp;</td>
493           <td class="mdname" nowrap> <em>params</em></td>
494         </tr>
495         <tr>
496           <td></td>
497           <td class="md">)&nbsp;</td>
498           <td class="md" colspan="2"><code> [virtual]</code></td>
499         </tr>
500
501       </table>
502     </td>
503   </tr>
504 </table>
505 <table cellspacing=5 cellpadding=0 border=0>
506   <tr>
507     <td>
508       &nbsp;
509     </td>
510     <td>
511
512 <p>
513 Called whenever an extended mode is to be processed. 
514 <p>
515 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.
516 <p>
517 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>.
518 <p>
519 <div class="fragment"><pre>00317 { <span class="keywordflow">return</span> <span class="keyword">false</span>; }
520 </pre></div>    </td>
521   </tr>
522 </table>
523 <a name="a16" doxytag="Module::OnInfo"></a><p>
524 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
525   <tr>
526     <td class="mdRow">
527       <table cellpadding="0" cellspacing="0" border="0">
528         <tr>
529           <td class="md" nowrap valign="top"> void Module::OnInfo </td>
530           <td class="md" valign="top">(&nbsp;</td>
531           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
532           <td class="mdname1" valign="top" nowrap> <em>user</em>          </td>
533           <td class="md" valign="top">&nbsp;)&nbsp;</td>
534           <td class="md" nowrap><code> [virtual]</code></td>
535         </tr>
536
537       </table>
538     </td>
539   </tr>
540 </table>
541 <table cellspacing=5 cellpadding=0 border=0>
542   <tr>
543     <td>
544       &nbsp;
545     </td>
546     <td>
547
548 <p>
549 Called whenever a user types /INFO. 
550 <p>
551 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>
552 &lt;nick&gt; :information here
553 <p>
554 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>.
555 <p>
556 <div class="fragment"><pre>00320 { };
557 </pre></div>    </td>
558   </tr>
559 </table>
560 <a name="a27" doxytag="Module::OnKill"></a><p>
561 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
562   <tr>
563     <td class="mdRow">
564       <table cellpadding="0" cellspacing="0" border="0">
565         <tr>
566           <td class="md" nowrap valign="top"> int Module::OnKill </td>
567           <td class="md" valign="top">(&nbsp;</td>
568           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
569           <td class="mdname" nowrap> <em>source</em>, </td>
570         </tr>
571         <tr>
572           <td></td>
573           <td></td>
574           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
575           <td class="mdname" nowrap> <em>dest</em>, </td>
576         </tr>
577         <tr>
578           <td></td>
579           <td></td>
580           <td class="md" nowrap>std::string&nbsp;</td>
581           <td class="mdname" nowrap> <em>reason</em></td>
582         </tr>
583         <tr>
584           <td></td>
585           <td class="md">)&nbsp;</td>
586           <td class="md" colspan="2"><code> [virtual]</code></td>
587         </tr>
588
589       </table>
590     </td>
591   </tr>
592 </table>
593 <table cellspacing=5 cellpadding=0 border=0>
594   <tr>
595     <td>
596       &nbsp;
597     </td>
598     <td>
599
600 <p>
601 Called when a client is disconnected by KILL. 
602 <p>
603 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!
604 <p>
605 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>.
606 <p>
607 <div class="fragment"><pre>00331 { <span class="keywordflow">return</span> 0; };
608 </pre></div>    </td>
609   </tr>
610 </table>
611 <a name="a28" doxytag="Module::OnLoadModule"></a><p>
612 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
613   <tr>
614     <td class="mdRow">
615       <table cellpadding="0" cellspacing="0" border="0">
616         <tr>
617           <td class="md" nowrap valign="top"> void Module::OnLoadModule </td>
618           <td class="md" valign="top">(&nbsp;</td>
619           <td class="md" nowrap valign="top"><a class="el" href="classModule.html">Module</a> *&nbsp;</td>
620           <td class="mdname" nowrap> <em>mod</em>, </td>
621         </tr>
622         <tr>
623           <td></td>
624           <td></td>
625           <td class="md" nowrap>std::string&nbsp;</td>
626           <td class="mdname" nowrap> <em>name</em></td>
627         </tr>
628         <tr>
629           <td></td>
630           <td class="md">)&nbsp;</td>
631           <td class="md" colspan="2"><code> [virtual]</code></td>
632         </tr>
633
634       </table>
635     </td>
636   </tr>
637 </table>
638 <table cellspacing=5 cellpadding=0 border=0>
639   <tr>
640     <td>
641       &nbsp;
642     </td>
643     <td>
644
645 <p>
646 Called whenever a module is loaded. 
647 <p>
648 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).
649 <p>
650 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>.
651 <p>
652 <div class="fragment"><pre>00332 { };
653 </pre></div>    </td>
654   </tr>
655 </table>
656 <a name="a15" doxytag="Module::OnOper"></a><p>
657 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
658   <tr>
659     <td class="mdRow">
660       <table cellpadding="0" cellspacing="0" border="0">
661         <tr>
662           <td class="md" nowrap valign="top"> void Module::OnOper </td>
663           <td class="md" valign="top">(&nbsp;</td>
664           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
665           <td class="mdname1" valign="top" nowrap> <em>user</em>          </td>
666           <td class="md" valign="top">&nbsp;)&nbsp;</td>
667           <td class="md" nowrap><code> [virtual]</code></td>
668         </tr>
669
670       </table>
671     </td>
672   </tr>
673 </table>
674 <table cellspacing=5 cellpadding=0 border=0>
675   <tr>
676     <td>
677       &nbsp;
678     </td>
679     <td>
680
681 <p>
682 Called whenever a user opers locally. 
683 <p>
684 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.
685 <p>
686 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>.
687 <p>
688 <div class="fragment"><pre>00319 { };
689 </pre></div>    </td>
690   </tr>
691 </table>
692 <a name="a8" doxytag="Module::OnPacketReceive"></a><p>
693 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
694   <tr>
695     <td class="mdRow">
696       <table cellpadding="0" cellspacing="0" border="0">
697         <tr>
698           <td class="md" nowrap valign="top"> void Module::OnPacketReceive </td>
699           <td class="md" valign="top">(&nbsp;</td>
700           <td class="md" nowrap valign="top">std::string &amp;&nbsp;</td>
701           <td class="mdname" nowrap> <em>data</em>, </td>
702         </tr>
703         <tr>
704           <td></td>
705           <td></td>
706           <td class="md" nowrap>std::string&nbsp;</td>
707           <td class="mdname" nowrap> <em>serv</em></td>
708         </tr>
709         <tr>
710           <td></td>
711           <td class="md">)&nbsp;</td>
712           <td class="md" colspan="2"><code> [virtual]</code></td>
713         </tr>
714
715       </table>
716     </td>
717   </tr>
718 </table>
719 <table cellspacing=5 cellpadding=0 border=0>
720   <tr>
721     <td>
722       &nbsp;
723     </td>
724     <td>
725
726 <p>
727 Called after a packet is received from another irc server. 
728 <p>
729 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.
730 <p>
731 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>.
732 <p>
733 <div class="fragment"><pre>00313 { }
734 </pre></div>    </td>
735   </tr>
736 </table>
737 <a name="a7" doxytag="Module::OnPacketTransmit"></a><p>
738 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
739   <tr>
740     <td class="mdRow">
741       <table cellpadding="0" cellspacing="0" border="0">
742         <tr>
743           <td class="md" nowrap valign="top"> void Module::OnPacketTransmit </td>
744           <td class="md" valign="top">(&nbsp;</td>
745           <td class="md" nowrap valign="top">std::string &amp;&nbsp;</td>
746           <td class="mdname" nowrap> <em>data</em>, </td>
747         </tr>
748         <tr>
749           <td></td>
750           <td></td>
751           <td class="md" nowrap>std::string&nbsp;</td>
752           <td class="mdname" nowrap> <em>serv</em></td>
753         </tr>
754         <tr>
755           <td></td>
756           <td class="md">)&nbsp;</td>
757           <td class="md" colspan="2"><code> [virtual]</code></td>
758         </tr>
759
760       </table>
761     </td>
762   </tr>
763 </table>
764 <table cellspacing=5 cellpadding=0 border=0>
765   <tr>
766     <td>
767       &nbsp;
768     </td>
769     <td>
770
771 <p>
772 Called before a packet is transmitted across the irc network between two irc servers. 
773 <p>
774 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.
775 <p>
776 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>.
777 <p>
778 <div class="fragment"><pre>00312 { }
779 </pre></div>    </td>
780   </tr>
781 </table>
782 <a name="a31" doxytag="Module::OnPreCommand"></a><p>
783 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
784   <tr>
785     <td class="mdRow">
786       <table cellpadding="0" cellspacing="0" border="0">
787         <tr>
788           <td class="md" nowrap valign="top"> int Module::OnPreCommand </td>
789           <td class="md" valign="top">(&nbsp;</td>
790           <td class="md" nowrap valign="top">std::string&nbsp;</td>
791           <td class="mdname" nowrap> <em>command</em>, </td>
792         </tr>
793         <tr>
794           <td></td>
795           <td></td>
796           <td class="md" nowrap>char **&nbsp;</td>
797           <td class="mdname" nowrap> <em>parameters</em>, </td>
798         </tr>
799         <tr>
800           <td></td>
801           <td></td>
802           <td class="md" nowrap>int&nbsp;</td>
803           <td class="mdname" nowrap> <em>pcnt</em>, </td>
804         </tr>
805         <tr>
806           <td></td>
807           <td></td>
808           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
809           <td class="mdname" nowrap> <em>user</em></td>
810         </tr>
811         <tr>
812           <td></td>
813           <td class="md">)&nbsp;</td>
814           <td class="md" colspan="2"><code> [virtual]</code></td>
815         </tr>
816
817       </table>
818     </td>
819   </tr>
820 </table>
821 <table cellspacing=5 cellpadding=0 border=0>
822   <tr>
823     <td>
824       &nbsp;
825     </td>
826     <td>
827
828 <p>
829 Called whenever any command is about to be executed. 
830 <p>
831 This event occurs for all registered commands, wether they are registered in the core, or another module, but it will not occur for invalid commands (e.g. ones which do not exist within the command table). By returning 1 from this method you may prevent the command being executed. If you do this, no output is created by the core, and it is down to your module to produce any output neccessary. Note that unless you return 1, you should not destroy any structures (e.g. by using <a class="el" href="classServer.html#a29">Server::QuitUser</a>) otherwise when the command's handler function executes after your method returns, it will be passed an invalid pointer to the user object and crash!)
832 <p>
833 Definition at line <a class="el" href="modules_8cpp-source.html#l00335">335</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
834 <p>
835 <div class="fragment"><pre>00335 { <span class="keywordflow">return</span> 0; };
836 </pre></div>    </td>
837   </tr>
838 </table>
839 <a name="a9" doxytag="Module::OnRehash"></a><p>
840 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
841   <tr>
842     <td class="mdRow">
843       <table cellpadding="0" cellspacing="0" border="0">
844         <tr>
845           <td class="md" nowrap valign="top"> void Module::OnRehash </td>
846           <td class="md" valign="top">(&nbsp;</td>
847           <td class="mdname1" valign="top" nowrap>          </td>
848           <td class="md" valign="top">&nbsp;)&nbsp;</td>
849           <td class="md" nowrap><code> [virtual]</code></td>
850         </tr>
851
852       </table>
853     </td>
854   </tr>
855 </table>
856 <table cellspacing=5 cellpadding=0 border=0>
857   <tr>
858     <td>
859       &nbsp;
860     </td>
861     <td>
862
863 <p>
864 Called on rehash. 
865 <p>
866 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.
867 <p>
868 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>.
869 <p>
870 <div class="fragment"><pre>00314 { }
871 </pre></div>    </td>
872   </tr>
873 </table>
874 <a name="a30" doxytag="Module::OnSendList"></a><p>
875 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
876   <tr>
877     <td class="mdRow">
878       <table cellpadding="0" cellspacing="0" border="0">
879         <tr>
880           <td class="md" nowrap valign="top"> void Module::OnSendList </td>
881           <td class="md" valign="top">(&nbsp;</td>
882           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
883           <td class="mdname" nowrap> <em>user</em>, </td>
884         </tr>
885         <tr>
886           <td></td>
887           <td></td>
888           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
889           <td class="mdname" nowrap> <em>channel</em>, </td>
890         </tr>
891         <tr>
892           <td></td>
893           <td></td>
894           <td class="md" nowrap>char&nbsp;</td>
895           <td class="mdname" nowrap> <em>mode</em></td>
896         </tr>
897         <tr>
898           <td></td>
899           <td class="md">)&nbsp;</td>
900           <td class="md" colspan="2"><code> [virtual]</code></td>
901         </tr>
902
903       </table>
904     </td>
905   </tr>
906 </table>
907 <table cellspacing=5 cellpadding=0 border=0>
908   <tr>
909     <td>
910       &nbsp;
911     </td>
912     <td>
913
914 <p>
915 Called whenever a list is needed for a listmode. 
916 <p>
917 For example, when a /MODE #channel +b (without any other parameters) is called, if a module was handling +b this function would be called. The function can then output any lists it wishes to. Please note that all modules will see all mode characters to provide the ability to extend each other, so please only output a list if the mode character given matches the one(s) you want to handle.
918 <p>
919 Definition at line <a class="el" href="modules_8cpp-source.html#l00334">334</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
920 <p>
921 <div class="fragment"><pre>00334 { };
922 </pre></div>    </td>
923   </tr>
924 </table>
925 <a name="a10" doxytag="Module::OnServerRaw"></a><p>
926 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
927   <tr>
928     <td class="mdRow">
929       <table cellpadding="0" cellspacing="0" border="0">
930         <tr>
931           <td class="md" nowrap valign="top"> void Module::OnServerRaw </td>
932           <td class="md" valign="top">(&nbsp;</td>
933           <td class="md" nowrap valign="top">std::string &amp;&nbsp;</td>
934           <td class="mdname" nowrap> <em>raw</em>, </td>
935         </tr>
936         <tr>
937           <td></td>
938           <td></td>
939           <td class="md" nowrap>bool&nbsp;</td>
940           <td class="mdname" nowrap> <em>inbound</em>, </td>
941         </tr>
942         <tr>
943           <td></td>
944           <td></td>
945           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
946           <td class="mdname" nowrap> <em>user</em></td>
947         </tr>
948         <tr>
949           <td></td>
950           <td class="md">)&nbsp;</td>
951           <td class="md" colspan="2"><code> [virtual]</code></td>
952         </tr>
953
954       </table>
955     </td>
956   </tr>
957 </table>
958 <table cellspacing=5 cellpadding=0 border=0>
959   <tr>
960     <td>
961       &nbsp;
962     </td>
963     <td>
964
965 <p>
966 Called when a raw command is transmitted or received. 
967 <p>
968 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.
969 <p>
970 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>.
971 <p>
972 <div class="fragment"><pre>00315 { }
973 </pre></div>    </td>
974   </tr>
975 </table>
976 <a name="a3" doxytag="Module::OnUserConnect"></a><p>
977 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
978   <tr>
979     <td class="mdRow">
980       <table cellpadding="0" cellspacing="0" border="0">
981         <tr>
982           <td class="md" nowrap valign="top"> void Module::OnUserConnect </td>
983           <td class="md" valign="top">(&nbsp;</td>
984           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
985           <td class="mdname1" valign="top" nowrap> <em>user</em>          </td>
986           <td class="md" valign="top">&nbsp;)&nbsp;</td>
987           <td class="md" nowrap><code> [virtual]</code></td>
988         </tr>
989
990       </table>
991     </td>
992   </tr>
993 </table>
994 <table cellspacing=5 cellpadding=0 border=0>
995   <tr>
996     <td>
997       &nbsp;
998     </td>
999     <td>
1000
1001 <p>
1002 Called when a user connects. 
1003 <p>
1004 The details of the connecting user are available to you in the parameter userrec *user
1005 <p>
1006 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>.
1007 <p>
1008 <div class="fragment"><pre>00308 { }
1009 </pre></div>    </td>
1010   </tr>
1011 </table>
1012 <a name="a5" doxytag="Module::OnUserJoin"></a><p>
1013 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1014   <tr>
1015     <td class="mdRow">
1016       <table cellpadding="0" cellspacing="0" border="0">
1017         <tr>
1018           <td class="md" nowrap valign="top"> void Module::OnUserJoin </td>
1019           <td class="md" valign="top">(&nbsp;</td>
1020           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1021           <td class="mdname" nowrap> <em>user</em>, </td>
1022         </tr>
1023         <tr>
1024           <td></td>
1025           <td></td>
1026           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
1027           <td class="mdname" nowrap> <em>channel</em></td>
1028         </tr>
1029         <tr>
1030           <td></td>
1031           <td class="md">)&nbsp;</td>
1032           <td class="md" colspan="2"><code> [virtual]</code></td>
1033         </tr>
1034
1035       </table>
1036     </td>
1037   </tr>
1038 </table>
1039 <table cellspacing=5 cellpadding=0 border=0>
1040   <tr>
1041     <td>
1042       &nbsp;
1043     </td>
1044     <td>
1045
1046 <p>
1047 Called when a user joins a channel. 
1048 <p>
1049 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
1050 <p>
1051 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>.
1052 <p>
1053 <div class="fragment"><pre>00310 { }
1054 </pre></div>    </td>
1055   </tr>
1056 </table>
1057 <a name="a14" doxytag="Module::OnUserKick"></a><p>
1058 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1059   <tr>
1060     <td class="mdRow">
1061       <table cellpadding="0" cellspacing="0" border="0">
1062         <tr>
1063           <td class="md" nowrap valign="top"> void Module::OnUserKick </td>
1064           <td class="md" valign="top">(&nbsp;</td>
1065           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1066           <td class="mdname" nowrap> <em>source</em>, </td>
1067         </tr>
1068         <tr>
1069           <td></td>
1070           <td></td>
1071           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1072           <td class="mdname" nowrap> <em>user</em>, </td>
1073         </tr>
1074         <tr>
1075           <td></td>
1076           <td></td>
1077           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
1078           <td class="mdname" nowrap> <em>chan</em>, </td>
1079         </tr>
1080         <tr>
1081           <td></td>
1082           <td></td>
1083           <td class="md" nowrap>std::string&nbsp;</td>
1084           <td class="mdname" nowrap> <em>reason</em></td>
1085         </tr>
1086         <tr>
1087           <td></td>
1088           <td class="md">)&nbsp;</td>
1089           <td class="md" colspan="2"><code> [virtual]</code></td>
1090         </tr>
1091
1092       </table>
1093     </td>
1094   </tr>
1095 </table>
1096 <table cellspacing=5 cellpadding=0 border=0>
1097   <tr>
1098     <td>
1099       &nbsp;
1100     </td>
1101     <td>
1102
1103 <p>
1104 Called whenever a user is kicked. 
1105 <p>
1106 If this method is called, the kick is already underway and cannot be prevented, so to prevent a kick, please use <a class="el" href="classModule.html#a13">Module::OnUserPreKick</a> instead of this method.
1107 <p>
1108 Definition at line <a class="el" href="modules_8cpp-source.html#l00339">339</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1109 <p>
1110 <div class="fragment"><pre>00339 { };
1111 </pre></div>    </td>
1112   </tr>
1113 </table>
1114 <a name="a6" doxytag="Module::OnUserPart"></a><p>
1115 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1116   <tr>
1117     <td class="mdRow">
1118       <table cellpadding="0" cellspacing="0" border="0">
1119         <tr>
1120           <td class="md" nowrap valign="top"> void Module::OnUserPart </td>
1121           <td class="md" valign="top">(&nbsp;</td>
1122           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1123           <td class="mdname" nowrap> <em>user</em>, </td>
1124         </tr>
1125         <tr>
1126           <td></td>
1127           <td></td>
1128           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
1129           <td class="mdname" nowrap> <em>channel</em></td>
1130         </tr>
1131         <tr>
1132           <td></td>
1133           <td class="md">)&nbsp;</td>
1134           <td class="md" colspan="2"><code> [virtual]</code></td>
1135         </tr>
1136
1137       </table>
1138     </td>
1139   </tr>
1140 </table>
1141 <table cellspacing=5 cellpadding=0 border=0>
1142   <tr>
1143     <td>
1144       &nbsp;
1145     </td>
1146     <td>
1147
1148 <p>
1149 Called when a user parts a channel. 
1150 <p>
1151 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
1152 <p>
1153 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>.
1154 <p>
1155 <div class="fragment"><pre>00311 { }
1156 </pre></div>    </td>
1157   </tr>
1158 </table>
1159 <a name="a22" doxytag="Module::OnUserPostNick"></a><p>
1160 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1161   <tr>
1162     <td class="mdRow">
1163       <table cellpadding="0" cellspacing="0" border="0">
1164         <tr>
1165           <td class="md" nowrap valign="top"> void Module::OnUserPostNick </td>
1166           <td class="md" valign="top">(&nbsp;</td>
1167           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1168           <td class="mdname" nowrap> <em>user</em>, </td>
1169         </tr>
1170         <tr>
1171           <td></td>
1172           <td></td>
1173           <td class="md" nowrap>std::string&nbsp;</td>
1174           <td class="mdname" nowrap> <em>oldnick</em></td>
1175         </tr>
1176         <tr>
1177           <td></td>
1178           <td class="md">)&nbsp;</td>
1179           <td class="md" colspan="2"><code> [virtual]</code></td>
1180         </tr>
1181
1182       </table>
1183     </td>
1184   </tr>
1185 </table>
1186 <table cellspacing=5 cellpadding=0 border=0>
1187   <tr>
1188     <td>
1189       &nbsp;
1190     </td>
1191     <td>
1192
1193 <p>
1194 Called after any nickchange, local or remote. 
1195 <p>
1196 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. 
1197 <p>
1198 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>.
1199 <p>
1200 <div class="fragment"><pre>00326 { };
1201 </pre></div>    </td>
1202   </tr>
1203 </table>
1204 <a name="a18" doxytag="Module::OnUserPreInvite"></a><p>
1205 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1206   <tr>
1207     <td class="mdRow">
1208       <table cellpadding="0" cellspacing="0" border="0">
1209         <tr>
1210           <td class="md" nowrap valign="top"> int Module::OnUserPreInvite </td>
1211           <td class="md" valign="top">(&nbsp;</td>
1212           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1213           <td class="mdname" nowrap> <em>source</em>, </td>
1214         </tr>
1215         <tr>
1216           <td></td>
1217           <td></td>
1218           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1219           <td class="mdname" nowrap> <em>dest</em>, </td>
1220         </tr>
1221         <tr>
1222           <td></td>
1223           <td></td>
1224           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
1225           <td class="mdname" nowrap> <em>channel</em></td>
1226         </tr>
1227         <tr>
1228           <td></td>
1229           <td class="md">)&nbsp;</td>
1230           <td class="md" colspan="2"><code> [virtual]</code></td>
1231         </tr>
1232
1233       </table>
1234     </td>
1235   </tr>
1236 </table>
1237 <table cellspacing=5 cellpadding=0 border=0>
1238   <tr>
1239     <td>
1240       &nbsp;
1241     </td>
1242     <td>
1243
1244 <p>
1245 Called whenever a user is about to invite another user into a channel, before any processing is done. 
1246 <p>
1247 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.
1248 <p>
1249 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>.
1250 <p>
1251 <div class="fragment"><pre>00322 { <span class="keywordflow">return</span> 0; };
1252 </pre></div>    </td>
1253   </tr>
1254 </table>
1255 <a name="a12" doxytag="Module::OnUserPreJoin"></a><p>
1256 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1257   <tr>
1258     <td class="mdRow">
1259       <table cellpadding="0" cellspacing="0" border="0">
1260         <tr>
1261           <td class="md" nowrap valign="top"> int Module::OnUserPreJoin </td>
1262           <td class="md" valign="top">(&nbsp;</td>
1263           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1264           <td class="mdname" nowrap> <em>user</em>, </td>
1265         </tr>
1266         <tr>
1267           <td></td>
1268           <td></td>
1269           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
1270           <td class="mdname" nowrap> <em>chan</em>, </td>
1271         </tr>
1272         <tr>
1273           <td></td>
1274           <td></td>
1275           <td class="md" nowrap>const char *&nbsp;</td>
1276           <td class="mdname" nowrap> <em>cname</em></td>
1277         </tr>
1278         <tr>
1279           <td></td>
1280           <td class="md">)&nbsp;</td>
1281           <td class="md" colspan="2"><code> [virtual]</code></td>
1282         </tr>
1283
1284       </table>
1285     </td>
1286   </tr>
1287 </table>
1288 <table cellspacing=5 cellpadding=0 border=0>
1289   <tr>
1290     <td>
1291       &nbsp;
1292     </td>
1293     <td>
1294
1295 <p>
1296 Called whenever a user is about to join a channel, before any processing is done. 
1297 <p>
1298 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>
1299 IMPORTANT NOTE!<p>
1300 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.
1301 <p>
1302 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>.
1303 <p>
1304 <div class="fragment"><pre>00316 { <span class="keywordflow">return</span> 0; }
1305 </pre></div>    </td>
1306   </tr>
1307 </table>
1308 <a name="a13" doxytag="Module::OnUserPreKick"></a><p>
1309 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1310   <tr>
1311     <td class="mdRow">
1312       <table cellpadding="0" cellspacing="0" border="0">
1313         <tr>
1314           <td class="md" nowrap valign="top"> int Module::OnUserPreKick </td>
1315           <td class="md" valign="top">(&nbsp;</td>
1316           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1317           <td class="mdname" nowrap> <em>source</em>, </td>
1318         </tr>
1319         <tr>
1320           <td></td>
1321           <td></td>
1322           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1323           <td class="mdname" nowrap> <em>user</em>, </td>
1324         </tr>
1325         <tr>
1326           <td></td>
1327           <td></td>
1328           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
1329           <td class="mdname" nowrap> <em>chan</em>, </td>
1330         </tr>
1331         <tr>
1332           <td></td>
1333           <td></td>
1334           <td class="md" nowrap>std::string&nbsp;</td>
1335           <td class="mdname" nowrap> <em>reason</em></td>
1336         </tr>
1337         <tr>
1338           <td></td>
1339           <td class="md">)&nbsp;</td>
1340           <td class="md" colspan="2"><code> [virtual]</code></td>
1341         </tr>
1342
1343       </table>
1344     </td>
1345   </tr>
1346 </table>
1347 <table cellspacing=5 cellpadding=0 border=0>
1348   <tr>
1349     <td>
1350       &nbsp;
1351     </td>
1352     <td>
1353
1354 <p>
1355 Called whenever a user is about to be kicked. 
1356 <p>
1357 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. 
1358 <p>
1359 Definition at line <a class="el" href="modules_8cpp-source.html#l00338">338</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1360 <p>
1361 <div class="fragment"><pre>00338 { <span class="keywordflow">return</span> 0; };
1362 </pre></div>    </td>
1363   </tr>
1364 </table>
1365 <a name="a19" doxytag="Module::OnUserPreMessage"></a><p>
1366 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1367   <tr>
1368     <td class="mdRow">
1369       <table cellpadding="0" cellspacing="0" border="0">
1370         <tr>
1371           <td class="md" nowrap valign="top"> int Module::OnUserPreMessage </td>
1372           <td class="md" valign="top">(&nbsp;</td>
1373           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1374           <td class="mdname" nowrap> <em>user</em>, </td>
1375         </tr>
1376         <tr>
1377           <td></td>
1378           <td></td>
1379           <td class="md" nowrap>void *&nbsp;</td>
1380           <td class="mdname" nowrap> <em>dest</em>, </td>
1381         </tr>
1382         <tr>
1383           <td></td>
1384           <td></td>
1385           <td class="md" nowrap>int&nbsp;</td>
1386           <td class="mdname" nowrap> <em>target_type</em>, </td>
1387         </tr>
1388         <tr>
1389           <td></td>
1390           <td></td>
1391           <td class="md" nowrap>std::string &amp;&nbsp;</td>
1392           <td class="mdname" nowrap> <em>text</em></td>
1393         </tr>
1394         <tr>
1395           <td></td>
1396           <td class="md">)&nbsp;</td>
1397           <td class="md" colspan="2"><code> [virtual]</code></td>
1398         </tr>
1399
1400       </table>
1401     </td>
1402   </tr>
1403 </table>
1404 <table cellspacing=5 cellpadding=0 border=0>
1405   <tr>
1406     <td>
1407       &nbsp;
1408     </td>
1409     <td>
1410
1411 <p>
1412 Called whenever a user is about to PRIVMSG A user or a channel, before any processing is done. 
1413 <p>
1414 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.
1415 <p>
1416 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>.
1417 <p>
1418 <div class="fragment"><pre>00323 { <span class="keywordflow">return</span> 0; };
1419 </pre></div>    </td>
1420   </tr>
1421 </table>
1422 <a name="a21" doxytag="Module::OnUserPreNick"></a><p>
1423 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1424   <tr>
1425     <td class="mdRow">
1426       <table cellpadding="0" cellspacing="0" border="0">
1427         <tr>
1428           <td class="md" nowrap valign="top"> int Module::OnUserPreNick </td>
1429           <td class="md" valign="top">(&nbsp;</td>
1430           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1431           <td class="mdname" nowrap> <em>user</em>, </td>
1432         </tr>
1433         <tr>
1434           <td></td>
1435           <td></td>
1436           <td class="md" nowrap>std::string&nbsp;</td>
1437           <td class="mdname" nowrap> <em>newnick</em></td>
1438         </tr>
1439         <tr>
1440           <td></td>
1441           <td class="md">)&nbsp;</td>
1442           <td class="md" colspan="2"><code> [virtual]</code></td>
1443         </tr>
1444
1445       </table>
1446     </td>
1447   </tr>
1448 </table>
1449 <table cellspacing=5 cellpadding=0 border=0>
1450   <tr>
1451     <td>
1452       &nbsp;
1453     </td>
1454     <td>
1455
1456 <p>
1457 Called before any nickchange, local or remote. 
1458 <p>
1459 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.
1460 <p>
1461 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>.
1462 <p>
1463 <div class="fragment"><pre>00325 { <span class="keywordflow">return</span> 0; };
1464 </pre></div>    </td>
1465   </tr>
1466 </table>
1467 <a name="a20" doxytag="Module::OnUserPreNotice"></a><p>
1468 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1469   <tr>
1470     <td class="mdRow">
1471       <table cellpadding="0" cellspacing="0" border="0">
1472         <tr>
1473           <td class="md" nowrap valign="top"> int Module::OnUserPreNotice </td>
1474           <td class="md" valign="top">(&nbsp;</td>
1475           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1476           <td class="mdname" nowrap> <em>user</em>, </td>
1477         </tr>
1478         <tr>
1479           <td></td>
1480           <td></td>
1481           <td class="md" nowrap>void *&nbsp;</td>
1482           <td class="mdname" nowrap> <em>dest</em>, </td>
1483         </tr>
1484         <tr>
1485           <td></td>
1486           <td></td>
1487           <td class="md" nowrap>int&nbsp;</td>
1488           <td class="mdname" nowrap> <em>target_type</em>, </td>
1489         </tr>
1490         <tr>
1491           <td></td>
1492           <td></td>
1493           <td class="md" nowrap>std::string &amp;&nbsp;</td>
1494           <td class="mdname" nowrap> <em>text</em></td>
1495         </tr>
1496         <tr>
1497           <td></td>
1498           <td class="md">)&nbsp;</td>
1499           <td class="md" colspan="2"><code> [virtual]</code></td>
1500         </tr>
1501
1502       </table>
1503     </td>
1504   </tr>
1505 </table>
1506 <table cellspacing=5 cellpadding=0 border=0>
1507   <tr>
1508     <td>
1509       &nbsp;
1510     </td>
1511     <td>
1512
1513 <p>
1514 Called whenever a user is about to NOTICE A user or a channel, before any processing is done. 
1515 <p>
1516 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.
1517 <p>
1518 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>.
1519 <p>
1520 <div class="fragment"><pre>00324 { <span class="keywordflow">return</span> 0; };
1521 </pre></div>    </td>
1522   </tr>
1523 </table>
1524 <a name="a4" doxytag="Module::OnUserQuit"></a><p>
1525 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1526   <tr>
1527     <td class="mdRow">
1528       <table cellpadding="0" cellspacing="0" border="0">
1529         <tr>
1530           <td class="md" nowrap valign="top"> void Module::OnUserQuit </td>
1531           <td class="md" valign="top">(&nbsp;</td>
1532           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1533           <td class="mdname1" valign="top" nowrap> <em>user</em>          </td>
1534           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1535           <td class="md" nowrap><code> [virtual]</code></td>
1536         </tr>
1537
1538       </table>
1539     </td>
1540   </tr>
1541 </table>
1542 <table cellspacing=5 cellpadding=0 border=0>
1543   <tr>
1544     <td>
1545       &nbsp;
1546     </td>
1547     <td>
1548
1549 <p>
1550 Called when a user quits. 
1551 <p>
1552 The details of the exiting user are available to you in the parameter userrec *user
1553 <p>
1554 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>.
1555 <p>
1556 <div class="fragment"><pre>00309 { }
1557 </pre></div>    </td>
1558   </tr>
1559 </table>
1560 <a name="a33" doxytag="Module::OnUserRegister"></a><p>
1561 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1562   <tr>
1563     <td class="mdRow">
1564       <table cellpadding="0" cellspacing="0" border="0">
1565         <tr>
1566           <td class="md" nowrap valign="top"> void Module::OnUserRegister </td>
1567           <td class="md" valign="top">(&nbsp;</td>
1568           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1569           <td class="mdname1" valign="top" nowrap> <em>user</em>          </td>
1570           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1571           <td class="md" nowrap><code> [virtual]</code></td>
1572         </tr>
1573
1574       </table>
1575     </td>
1576   </tr>
1577 </table>
1578 <table cellspacing=5 cellpadding=0 border=0>
1579   <tr>
1580     <td>
1581       &nbsp;
1582     </td>
1583     <td>
1584
1585 <p>
1586 Called whenever a user is about to register their connection (e.g. 
1587 <p>
1588 before the user is sent the MOTD etc). Modules can use this method if they are performing a function which must be done before the actual connection is completed (e.g. ident lookups, dnsbl lookups, etc). Note that you should NOT delete the user record here by causing a disconnection! Use OnUserConnect for that instead.
1589 <p>
1590 Definition at line <a class="el" href="modules_8cpp-source.html#l00337">337</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1591 <p>
1592 <div class="fragment"><pre>00337 { };
1593 </pre></div>    </td>
1594   </tr>
1595 </table>
1596 <a name="a24" doxytag="Module::OnUserSync"></a><p>
1597 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1598   <tr>
1599     <td class="mdRow">
1600       <table cellpadding="0" cellspacing="0" border="0">
1601         <tr>
1602           <td class="md" nowrap valign="top"> <a class="el" href="modules_8h.html#a32">string_list</a> Module::OnUserSync </td>
1603           <td class="md" valign="top">(&nbsp;</td>
1604           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1605           <td class="mdname1" valign="top" nowrap> <em>user</em>          </td>
1606           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1607           <td class="md" nowrap><code> [virtual]</code></td>
1608         </tr>
1609
1610       </table>
1611     </td>
1612   </tr>
1613 </table>
1614 <table cellspacing=5 cellpadding=0 border=0>
1615   <tr>
1616     <td>
1617       &nbsp;
1618     </td>
1619     <td>
1620
1621 <p>
1622 Called during a netburst to sync user data. 
1623 <p>
1624 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.
1625 <p>
1626 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>.
1627 <p>
1628 References <a class="el" href="modules_8h-source.html#l00068">string_list</a>.
1629 <p>
1630 <div class="fragment"><pre>00328 { <a class="code" href="modules_8h.html#a32">string_list</a> empty; <span class="keywordflow">return</span> empty; }
1631 </pre></div>    </td>
1632   </tr>
1633 </table>
1634 <a name="a17" doxytag="Module::OnWhois"></a><p>
1635 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1636   <tr>
1637     <td class="mdRow">
1638       <table cellpadding="0" cellspacing="0" border="0">
1639         <tr>
1640           <td class="md" nowrap valign="top"> void Module::OnWhois </td>
1641           <td class="md" valign="top">(&nbsp;</td>
1642           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1643           <td class="mdname" nowrap> <em>source</em>, </td>
1644         </tr>
1645         <tr>
1646           <td></td>
1647           <td></td>
1648           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1649           <td class="mdname" nowrap> <em>dest</em></td>
1650         </tr>
1651         <tr>
1652           <td></td>
1653           <td class="md">)&nbsp;</td>
1654           <td class="md" colspan="2"><code> [virtual]</code></td>
1655         </tr>
1656
1657       </table>
1658     </td>
1659   </tr>
1660 </table>
1661 <table cellspacing=5 cellpadding=0 border=0>
1662   <tr>
1663     <td>
1664       &nbsp;
1665     </td>
1666     <td>
1667
1668 <p>
1669 Called whenever a /WHOIS is performed on a local user. 
1670 <p>
1671 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.
1672 <p>
1673 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>.
1674 <p>
1675 <div class="fragment"><pre>00321 { };
1676 </pre></div>    </td>
1677   </tr>
1678 </table>
1679 <hr>The documentation for this class was generated from the following files:<ul>
1680 <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>
1681 <hr size="1"><address style="align: right;"><small>Generated on Thu Apr 14 21:12:10 2005 for InspIRCd by
1682 <a href="http://www.doxygen.org/index.html">
1683 <img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
1684 </a>1.3.3 </small></address>
1685 </body>
1686 </html>