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