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">
6 <!-- Generated by Doxygen 1.3.3 -->
7 <div class="qindex"><a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Compound List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Compound Members</a> | <a class="qindex" href="globals.html">File 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>
11 <code>#include <<a class="el" href="modules_8h-source.html">modules.h</a>></code>
13 Inherits <a class="el" href="classclassbase.html">classbase</a>.
15 <a href="classModule-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
17 <tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
18 <tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a0">Module</a> ()</td></tr>
20 <tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a1">~Module</a> ()</td></tr>
23 <tr><td class="mdescLeft"> </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> </td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a2">GetVersion</a> ()</td></tr>
26 <tr><td class="mdescLeft"> </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 </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>
29 <tr><td class="mdescLeft"> </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 </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>
32 <tr><td class="mdescLeft"> </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 </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>
35 <tr><td class="mdescLeft"> </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 </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>
38 <tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a7">OnPacketTransmit</a> (std::string &data, std::string serv)</td></tr>
41 <tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a8">OnPacketReceive</a> (std::string &data, std::string serv)</td></tr>
44 <tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a9">OnRehash</a> ()</td></tr>
47 <tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a10">OnServerRaw</a> (std::string &raw, bool inbound, <a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
50 <tr><td class="mdescLeft"> </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 </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> &params)</td></tr>
53 <tr><td class="mdescLeft"> </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 </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>
56 <tr><td class="mdescLeft"> </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 </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>
59 <tr><td class="mdescLeft"> </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 </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>
62 <tr><td class="mdescLeft"> </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 </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>
65 <tr><td class="mdescLeft"> </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 </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>
68 <tr><td class="mdescLeft"> </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 </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>
71 <tr><td class="mdescLeft"> </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 </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>
74 <tr><td class="mdescLeft"> </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 </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 &text)</td></tr>
77 <tr><td class="mdescLeft"> </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 </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 &text)</td></tr>
80 <tr><td class="mdescLeft"> </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 </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>
83 <tr><td class="mdescLeft"> </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 </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>
86 <tr><td class="mdescLeft"> </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 </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>
89 <tr><td class="mdescLeft"> </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> </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>
92 <tr><td class="mdescLeft"> </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> </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>
95 <tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a26">On005Numeric</a> (std::string &output)</td></tr>
98 <tr><td class="mdescLeft"> </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 </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>
101 <tr><td class="mdescLeft"> </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 </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>
104 <tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign=bottom><a class="el" href="classModule.html#a29">OnBackgroundTimer</a> (time_t curtime)</td></tr>
107 <tr><td class="mdescLeft"> </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 </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>
110 <tr><td class="mdescLeft"> </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 </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>
113 <tr><td class="mdescLeft"> </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 </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>
116 <tr><td class="mdescLeft"> </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 </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>
119 <tr><td class="mdescLeft"> </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>
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.
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.
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 & Destructor Documentation</h2>
129 <a name="a0" doxytag="Module::Module"></a><p>
130 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
133 <table cellpadding="0" cellspacing="0" border="0">
135 <td class="md" nowrap valign="top"> Module::Module </td>
136 <td class="md" valign="top">( </td>
137 <td class="mdname1" valign="top" nowrap> </td>
138 <td class="md" valign="top"> ) </td>
139 <td class="md" nowrap></td>
146 <table cellspacing=5 cellpadding=0 border=0>
154 Default constructor creates a module class.
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>.
160 <div class="fragment"><pre>00306 { }
164 <a name="a1" doxytag="Module::~Module"></a><p>
165 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
168 <table cellpadding="0" cellspacing="0" border="0">
170 <td class="md" nowrap valign="top"> Module::~<a class="el" href="classModule.html">Module</a> </td>
171 <td class="md" valign="top">( </td>
172 <td class="mdname1" valign="top" nowrap> </td>
173 <td class="md" valign="top"> ) </td>
174 <td class="md" nowrap><code> [virtual]</code></td>
181 <table cellspacing=5 cellpadding=0 border=0>
189 Default destructor destroys a module class.
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>.
195 <div class="fragment"><pre>00307 { }
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">
204 <table cellpadding="0" cellspacing="0" border="0">
206 <td class="md" nowrap valign="top"> <a class="el" href="classVersion.html">Version</a> Module::GetVersion </td>
207 <td class="md" valign="top">( </td>
208 <td class="mdname1" valign="top" nowrap> </td>
209 <td class="md" valign="top"> ) </td>
210 <td class="md" nowrap><code> [virtual]</code></td>
217 <table cellspacing=5 cellpadding=0 border=0>
225 Returns the version number of a Module.
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>
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>.
231 References <a class="el" href="modules_8h-source.html#l00054">VF_VENDOR</a>.
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); }
237 <a name="a26" doxytag="Module::On005Numeric"></a><p>
238 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
241 <table cellpadding="0" cellspacing="0" border="0">
243 <td class="md" nowrap valign="top"> void Module::On005Numeric </td>
244 <td class="md" valign="top">( </td>
245 <td class="md" nowrap valign="top">std::string & </td>
246 <td class="mdname1" valign="top" nowrap> <em>output</em> </td>
247 <td class="md" valign="top"> ) </td>
248 <td class="md" nowrap><code> [virtual]</code></td>
255 <table cellspacing=5 cellpadding=0 border=0>
263 Called when a 005 numeric is about to be output.
265 The module should modify the 005 numeric if needed to indicate its features.
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>.
269 <div class="fragment"><pre>00330 { };
273 <a name="a23" doxytag="Module::OnAccessCheck"></a><p>
274 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
277 <table cellpadding="0" cellspacing="0" border="0">
279 <td class="md" nowrap valign="top"> int Module::OnAccessCheck </td>
280 <td class="md" valign="top">( </td>
281 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
282 <td class="mdname" nowrap> <em>source</em>, </td>
287 <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> * </td>
288 <td class="mdname" nowrap> <em>dest</em>, </td>
293 <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> * </td>
294 <td class="mdname" nowrap> <em>channel</em>, </td>
299 <td class="md" nowrap>int </td>
300 <td class="mdname" nowrap> <em>access_type</em></td>
304 <td class="md">) </td>
305 <td class="md" colspan="2"><code> [virtual]</code></td>
312 <table cellspacing=5 cellpadding=0 border=0>
320 Called before an action which requires a channel privilage check.
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>
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>
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).
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>.
338 References <a class="el" href="modules_8h-source.html#l00037">ACR_DEFAULT</a>.
340 <div class="fragment"><pre>00327 { <span class="keywordflow">return</span> <a class="code" href="modules_8h.html#a8">ACR_DEFAULT</a>; };
344 <a name="a29" doxytag="Module::OnBackgroundTimer"></a><p>
345 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
348 <table cellpadding="0" cellspacing="0" border="0">
350 <td class="md" nowrap valign="top"> void Module::OnBackgroundTimer </td>
351 <td class="md" valign="top">( </td>
352 <td class="md" nowrap valign="top">time_t </td>
353 <td class="mdname1" valign="top" nowrap> <em>curtime</em> </td>
354 <td class="md" valign="top"> ) </td>
355 <td class="md" nowrap><code> [virtual]</code></td>
362 <table cellspacing=5 cellpadding=0 border=0>
370 Called once every five seconds for background processing.
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.
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>.
376 <div class="fragment"><pre>00333 { };
380 <a name="a25" doxytag="Module::OnChannelSync"></a><p>
381 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
384 <table cellpadding="0" cellspacing="0" border="0">
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">( </td>
388 <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> * </td>
389 <td class="mdname1" valign="top" nowrap> <em>chan</em> </td>
390 <td class="md" valign="top"> ) </td>
391 <td class="md" nowrap><code> [virtual]</code></td>
398 <table cellspacing=5 cellpadding=0 border=0>
406 Called during a netburst to sync channel data.
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.
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>.
412 References <a class="el" href="modules_8h-source.html#l00068">string_list</a>.
414 <div class="fragment"><pre>00329 { <a class="code" href="modules_8h.html#a32">string_list</a> empty; <span class="keywordflow">return</span> empty; }
418 <a name="a32" doxytag="Module::OnCheckReady"></a><p>
419 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
422 <table cellpadding="0" cellspacing="0" border="0">
424 <td class="md" nowrap valign="top"> bool Module::OnCheckReady </td>
425 <td class="md" valign="top">( </td>
426 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
427 <td class="mdname1" valign="top" nowrap> <em>user</em> </td>
428 <td class="md" valign="top"> ) </td>
429 <td class="md" nowrap><code> [virtual]</code></td>
436 <table cellspacing=5 cellpadding=0 border=0>
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.
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.
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>.
450 <div class="fragment"><pre>00336 { <span class="keywordflow">return</span> <span class="keyword">true</span>; };
454 <a name="a11" doxytag="Module::OnExtendedMode"></a><p>
455 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
458 <table cellpadding="0" cellspacing="0" border="0">
460 <td class="md" nowrap valign="top"> int Module::OnExtendedMode </td>
461 <td class="md" valign="top">( </td>
462 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
463 <td class="mdname" nowrap> <em>user</em>, </td>
468 <td class="md" nowrap>void * </td>
469 <td class="mdname" nowrap> <em>target</em>, </td>
474 <td class="md" nowrap>char </td>
475 <td class="mdname" nowrap> <em>modechar</em>, </td>
480 <td class="md" nowrap>int </td>
481 <td class="mdname" nowrap> <em>type</em>, </td>
486 <td class="md" nowrap>bool </td>
487 <td class="mdname" nowrap> <em>mode_on</em>, </td>
492 <td class="md" nowrap><a class="el" href="modules_8h.html#a32">string_list</a> & </td>
493 <td class="mdname" nowrap> <em>params</em></td>
497 <td class="md">) </td>
498 <td class="md" colspan="2"><code> [virtual]</code></td>
505 <table cellspacing=5 cellpadding=0 border=0>
513 Called whenever an extended mode is to be processed.
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.
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>.
519 <div class="fragment"><pre>00317 { <span class="keywordflow">return</span> <span class="keyword">false</span>; }
523 <a name="a16" doxytag="Module::OnInfo"></a><p>
524 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
527 <table cellpadding="0" cellspacing="0" border="0">
529 <td class="md" nowrap valign="top"> void Module::OnInfo </td>
530 <td class="md" valign="top">( </td>
531 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
532 <td class="mdname1" valign="top" nowrap> <em>user</em> </td>
533 <td class="md" valign="top"> ) </td>
534 <td class="md" nowrap><code> [virtual]</code></td>
541 <table cellspacing=5 cellpadding=0 border=0>
549 Called whenever a user types /INFO.
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 <nick> :information here
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>.
556 <div class="fragment"><pre>00320 { };
560 <a name="a27" doxytag="Module::OnKill"></a><p>
561 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
564 <table cellpadding="0" cellspacing="0" border="0">
566 <td class="md" nowrap valign="top"> int Module::OnKill </td>
567 <td class="md" valign="top">( </td>
568 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
569 <td class="mdname" nowrap> <em>source</em>, </td>
574 <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> * </td>
575 <td class="mdname" nowrap> <em>dest</em>, </td>
580 <td class="md" nowrap>std::string </td>
581 <td class="mdname" nowrap> <em>reason</em></td>
585 <td class="md">) </td>
586 <td class="md" colspan="2"><code> [virtual]</code></td>
593 <table cellspacing=5 cellpadding=0 border=0>
601 Called when a client is disconnected by KILL.
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!
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>.
607 <div class="fragment"><pre>00331 { <span class="keywordflow">return</span> 0; };
611 <a name="a28" doxytag="Module::OnLoadModule"></a><p>
612 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
615 <table cellpadding="0" cellspacing="0" border="0">
617 <td class="md" nowrap valign="top"> void Module::OnLoadModule </td>
618 <td class="md" valign="top">( </td>
619 <td class="md" nowrap valign="top"><a class="el" href="classModule.html">Module</a> * </td>
620 <td class="mdname" nowrap> <em>mod</em>, </td>
625 <td class="md" nowrap>std::string </td>
626 <td class="mdname" nowrap> <em>name</em></td>
630 <td class="md">) </td>
631 <td class="md" colspan="2"><code> [virtual]</code></td>
638 <table cellspacing=5 cellpadding=0 border=0>
646 Called whenever a module is loaded.
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).
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>.
652 <div class="fragment"><pre>00332 { };
656 <a name="a15" doxytag="Module::OnOper"></a><p>
657 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
660 <table cellpadding="0" cellspacing="0" border="0">
662 <td class="md" nowrap valign="top"> void Module::OnOper </td>
663 <td class="md" valign="top">( </td>
664 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
665 <td class="mdname1" valign="top" nowrap> <em>user</em> </td>
666 <td class="md" valign="top"> ) </td>
667 <td class="md" nowrap><code> [virtual]</code></td>
674 <table cellspacing=5 cellpadding=0 border=0>
682 Called whenever a user opers locally.
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.
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>.
688 <div class="fragment"><pre>00319 { };
692 <a name="a8" doxytag="Module::OnPacketReceive"></a><p>
693 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
696 <table cellpadding="0" cellspacing="0" border="0">
698 <td class="md" nowrap valign="top"> void Module::OnPacketReceive </td>
699 <td class="md" valign="top">( </td>
700 <td class="md" nowrap valign="top">std::string & </td>
701 <td class="mdname" nowrap> <em>data</em>, </td>
706 <td class="md" nowrap>std::string </td>
707 <td class="mdname" nowrap> <em>serv</em></td>
711 <td class="md">) </td>
712 <td class="md" colspan="2"><code> [virtual]</code></td>
719 <table cellspacing=5 cellpadding=0 border=0>
727 Called after a packet is received from another irc server.
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.
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>.
733 <div class="fragment"><pre>00313 { }
737 <a name="a7" doxytag="Module::OnPacketTransmit"></a><p>
738 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
741 <table cellpadding="0" cellspacing="0" border="0">
743 <td class="md" nowrap valign="top"> void Module::OnPacketTransmit </td>
744 <td class="md" valign="top">( </td>
745 <td class="md" nowrap valign="top">std::string & </td>
746 <td class="mdname" nowrap> <em>data</em>, </td>
751 <td class="md" nowrap>std::string </td>
752 <td class="mdname" nowrap> <em>serv</em></td>
756 <td class="md">) </td>
757 <td class="md" colspan="2"><code> [virtual]</code></td>
764 <table cellspacing=5 cellpadding=0 border=0>
772 Called before a packet is transmitted across the irc network between two irc servers.
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.
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>.
778 <div class="fragment"><pre>00312 { }
782 <a name="a31" doxytag="Module::OnPreCommand"></a><p>
783 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
786 <table cellpadding="0" cellspacing="0" border="0">
788 <td class="md" nowrap valign="top"> int Module::OnPreCommand </td>
789 <td class="md" valign="top">( </td>
790 <td class="md" nowrap valign="top">std::string </td>
791 <td class="mdname" nowrap> <em>command</em>, </td>
796 <td class="md" nowrap>char ** </td>
797 <td class="mdname" nowrap> <em>parameters</em>, </td>
802 <td class="md" nowrap>int </td>
803 <td class="mdname" nowrap> <em>pcnt</em>, </td>
808 <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> * </td>
809 <td class="mdname" nowrap> <em>user</em></td>
813 <td class="md">) </td>
814 <td class="md" colspan="2"><code> [virtual]</code></td>
821 <table cellspacing=5 cellpadding=0 border=0>
829 Called whenever any command is about to be executed.
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!)
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>.
835 <div class="fragment"><pre>00335 { <span class="keywordflow">return</span> 0; };
839 <a name="a9" doxytag="Module::OnRehash"></a><p>
840 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
843 <table cellpadding="0" cellspacing="0" border="0">
845 <td class="md" nowrap valign="top"> void Module::OnRehash </td>
846 <td class="md" valign="top">( </td>
847 <td class="mdname1" valign="top" nowrap> </td>
848 <td class="md" valign="top"> ) </td>
849 <td class="md" nowrap><code> [virtual]</code></td>
856 <table cellspacing=5 cellpadding=0 border=0>
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.
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>.
870 <div class="fragment"><pre>00314 { }
874 <a name="a30" doxytag="Module::OnSendList"></a><p>
875 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
878 <table cellpadding="0" cellspacing="0" border="0">
880 <td class="md" nowrap valign="top"> void Module::OnSendList </td>
881 <td class="md" valign="top">( </td>
882 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
883 <td class="mdname" nowrap> <em>user</em>, </td>
888 <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> * </td>
889 <td class="mdname" nowrap> <em>channel</em>, </td>
894 <td class="md" nowrap>char </td>
895 <td class="mdname" nowrap> <em>mode</em></td>
899 <td class="md">) </td>
900 <td class="md" colspan="2"><code> [virtual]</code></td>
907 <table cellspacing=5 cellpadding=0 border=0>
915 Called whenever a list is needed for a listmode.
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.
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>.
921 <div class="fragment"><pre>00334 { };
925 <a name="a10" doxytag="Module::OnServerRaw"></a><p>
926 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
929 <table cellpadding="0" cellspacing="0" border="0">
931 <td class="md" nowrap valign="top"> void Module::OnServerRaw </td>
932 <td class="md" valign="top">( </td>
933 <td class="md" nowrap valign="top">std::string & </td>
934 <td class="mdname" nowrap> <em>raw</em>, </td>
939 <td class="md" nowrap>bool </td>
940 <td class="mdname" nowrap> <em>inbound</em>, </td>
945 <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> * </td>
946 <td class="mdname" nowrap> <em>user</em></td>
950 <td class="md">) </td>
951 <td class="md" colspan="2"><code> [virtual]</code></td>
958 <table cellspacing=5 cellpadding=0 border=0>
966 Called when a raw command is transmitted or received.
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.
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>.
972 <div class="fragment"><pre>00315 { }
976 <a name="a3" doxytag="Module::OnUserConnect"></a><p>
977 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
980 <table cellpadding="0" cellspacing="0" border="0">
982 <td class="md" nowrap valign="top"> void Module::OnUserConnect </td>
983 <td class="md" valign="top">( </td>
984 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
985 <td class="mdname1" valign="top" nowrap> <em>user</em> </td>
986 <td class="md" valign="top"> ) </td>
987 <td class="md" nowrap><code> [virtual]</code></td>
994 <table cellspacing=5 cellpadding=0 border=0>
1002 Called when a user connects.
1004 The details of the connecting user are available to you in the parameter userrec *user
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>.
1008 <div class="fragment"><pre>00308 { }
1012 <a name="a5" doxytag="Module::OnUserJoin"></a><p>
1013 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1016 <table cellpadding="0" cellspacing="0" border="0">
1018 <td class="md" nowrap valign="top"> void Module::OnUserJoin </td>
1019 <td class="md" valign="top">( </td>
1020 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
1021 <td class="mdname" nowrap> <em>user</em>, </td>
1026 <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> * </td>
1027 <td class="mdname" nowrap> <em>channel</em></td>
1031 <td class="md">) </td>
1032 <td class="md" colspan="2"><code> [virtual]</code></td>
1039 <table cellspacing=5 cellpadding=0 border=0>
1047 Called when a user joins a channel.
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
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>.
1053 <div class="fragment"><pre>00310 { }
1057 <a name="a14" doxytag="Module::OnUserKick"></a><p>
1058 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1061 <table cellpadding="0" cellspacing="0" border="0">
1063 <td class="md" nowrap valign="top"> void Module::OnUserKick </td>
1064 <td class="md" valign="top">( </td>
1065 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
1066 <td class="mdname" nowrap> <em>source</em>, </td>
1071 <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> * </td>
1072 <td class="mdname" nowrap> <em>user</em>, </td>
1077 <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> * </td>
1078 <td class="mdname" nowrap> <em>chan</em>, </td>
1083 <td class="md" nowrap>std::string </td>
1084 <td class="mdname" nowrap> <em>reason</em></td>
1088 <td class="md">) </td>
1089 <td class="md" colspan="2"><code> [virtual]</code></td>
1096 <table cellspacing=5 cellpadding=0 border=0>
1104 Called whenever a user is kicked.
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.
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>.
1110 <div class="fragment"><pre>00339 { };
1114 <a name="a6" doxytag="Module::OnUserPart"></a><p>
1115 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1118 <table cellpadding="0" cellspacing="0" border="0">
1120 <td class="md" nowrap valign="top"> void Module::OnUserPart </td>
1121 <td class="md" valign="top">( </td>
1122 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
1123 <td class="mdname" nowrap> <em>user</em>, </td>
1128 <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> * </td>
1129 <td class="mdname" nowrap> <em>channel</em></td>
1133 <td class="md">) </td>
1134 <td class="md" colspan="2"><code> [virtual]</code></td>
1141 <table cellspacing=5 cellpadding=0 border=0>
1149 Called when a user parts a channel.
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
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>.
1155 <div class="fragment"><pre>00311 { }
1159 <a name="a22" doxytag="Module::OnUserPostNick"></a><p>
1160 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1163 <table cellpadding="0" cellspacing="0" border="0">
1165 <td class="md" nowrap valign="top"> void Module::OnUserPostNick </td>
1166 <td class="md" valign="top">( </td>
1167 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
1168 <td class="mdname" nowrap> <em>user</em>, </td>
1173 <td class="md" nowrap>std::string </td>
1174 <td class="mdname" nowrap> <em>oldnick</em></td>
1178 <td class="md">) </td>
1179 <td class="md" colspan="2"><code> [virtual]</code></td>
1186 <table cellspacing=5 cellpadding=0 border=0>
1194 Called after any nickchange, local or remote.
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->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.
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>.
1200 <div class="fragment"><pre>00326 { };
1204 <a name="a18" doxytag="Module::OnUserPreInvite"></a><p>
1205 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1208 <table cellpadding="0" cellspacing="0" border="0">
1210 <td class="md" nowrap valign="top"> int Module::OnUserPreInvite </td>
1211 <td class="md" valign="top">( </td>
1212 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
1213 <td class="mdname" nowrap> <em>source</em>, </td>
1218 <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> * </td>
1219 <td class="mdname" nowrap> <em>dest</em>, </td>
1224 <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> * </td>
1225 <td class="mdname" nowrap> <em>channel</em></td>
1229 <td class="md">) </td>
1230 <td class="md" colspan="2"><code> [virtual]</code></td>
1237 <table cellspacing=5 cellpadding=0 border=0>
1245 Called whenever a user is about to invite another user into a channel, before any processing is done.
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.
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>.
1251 <div class="fragment"><pre>00322 { <span class="keywordflow">return</span> 0; };
1255 <a name="a12" doxytag="Module::OnUserPreJoin"></a><p>
1256 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1259 <table cellpadding="0" cellspacing="0" border="0">
1261 <td class="md" nowrap valign="top"> int Module::OnUserPreJoin </td>
1262 <td class="md" valign="top">( </td>
1263 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
1264 <td class="mdname" nowrap> <em>user</em>, </td>
1269 <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> * </td>
1270 <td class="mdname" nowrap> <em>chan</em>, </td>
1275 <td class="md" nowrap>const char * </td>
1276 <td class="mdname" nowrap> <em>cname</em></td>
1280 <td class="md">) </td>
1281 <td class="md" colspan="2"><code> [virtual]</code></td>
1288 <table cellspacing=5 cellpadding=0 border=0>
1296 Called whenever a user is about to join a channel, before any processing is done.
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>
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.
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>.
1304 <div class="fragment"><pre>00316 { <span class="keywordflow">return</span> 0; }
1308 <a name="a13" doxytag="Module::OnUserPreKick"></a><p>
1309 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1312 <table cellpadding="0" cellspacing="0" border="0">
1314 <td class="md" nowrap valign="top"> int Module::OnUserPreKick </td>
1315 <td class="md" valign="top">( </td>
1316 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
1317 <td class="mdname" nowrap> <em>source</em>, </td>
1322 <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> * </td>
1323 <td class="mdname" nowrap> <em>user</em>, </td>
1328 <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> * </td>
1329 <td class="mdname" nowrap> <em>chan</em>, </td>
1334 <td class="md" nowrap>std::string </td>
1335 <td class="mdname" nowrap> <em>reason</em></td>
1339 <td class="md">) </td>
1340 <td class="md" colspan="2"><code> [virtual]</code></td>
1347 <table cellspacing=5 cellpadding=0 border=0>
1355 Called whenever a user is about to be kicked.
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.
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>.
1361 <div class="fragment"><pre>00338 { <span class="keywordflow">return</span> 0; };
1365 <a name="a19" doxytag="Module::OnUserPreMessage"></a><p>
1366 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1369 <table cellpadding="0" cellspacing="0" border="0">
1371 <td class="md" nowrap valign="top"> int Module::OnUserPreMessage </td>
1372 <td class="md" valign="top">( </td>
1373 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
1374 <td class="mdname" nowrap> <em>user</em>, </td>
1379 <td class="md" nowrap>void * </td>
1380 <td class="mdname" nowrap> <em>dest</em>, </td>
1385 <td class="md" nowrap>int </td>
1386 <td class="mdname" nowrap> <em>target_type</em>, </td>
1391 <td class="md" nowrap>std::string & </td>
1392 <td class="mdname" nowrap> <em>text</em></td>
1396 <td class="md">) </td>
1397 <td class="md" colspan="2"><code> [virtual]</code></td>
1404 <table cellspacing=5 cellpadding=0 border=0>
1412 Called whenever a user is about to PRIVMSG A user or a channel, before any processing is done.
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.
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>.
1418 <div class="fragment"><pre>00323 { <span class="keywordflow">return</span> 0; };
1422 <a name="a21" doxytag="Module::OnUserPreNick"></a><p>
1423 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1426 <table cellpadding="0" cellspacing="0" border="0">
1428 <td class="md" nowrap valign="top"> int Module::OnUserPreNick </td>
1429 <td class="md" valign="top">( </td>
1430 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
1431 <td class="mdname" nowrap> <em>user</em>, </td>
1436 <td class="md" nowrap>std::string </td>
1437 <td class="mdname" nowrap> <em>newnick</em></td>
1441 <td class="md">) </td>
1442 <td class="md" colspan="2"><code> [virtual]</code></td>
1449 <table cellspacing=5 cellpadding=0 border=0>
1457 Called before any nickchange, local or remote.
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->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.
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>.
1463 <div class="fragment"><pre>00325 { <span class="keywordflow">return</span> 0; };
1467 <a name="a20" doxytag="Module::OnUserPreNotice"></a><p>
1468 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1471 <table cellpadding="0" cellspacing="0" border="0">
1473 <td class="md" nowrap valign="top"> int Module::OnUserPreNotice </td>
1474 <td class="md" valign="top">( </td>
1475 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
1476 <td class="mdname" nowrap> <em>user</em>, </td>
1481 <td class="md" nowrap>void * </td>
1482 <td class="mdname" nowrap> <em>dest</em>, </td>
1487 <td class="md" nowrap>int </td>
1488 <td class="mdname" nowrap> <em>target_type</em>, </td>
1493 <td class="md" nowrap>std::string & </td>
1494 <td class="mdname" nowrap> <em>text</em></td>
1498 <td class="md">) </td>
1499 <td class="md" colspan="2"><code> [virtual]</code></td>
1506 <table cellspacing=5 cellpadding=0 border=0>
1514 Called whenever a user is about to NOTICE A user or a channel, before any processing is done.
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.
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>.
1520 <div class="fragment"><pre>00324 { <span class="keywordflow">return</span> 0; };
1524 <a name="a4" doxytag="Module::OnUserQuit"></a><p>
1525 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1528 <table cellpadding="0" cellspacing="0" border="0">
1530 <td class="md" nowrap valign="top"> void Module::OnUserQuit </td>
1531 <td class="md" valign="top">( </td>
1532 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
1533 <td class="mdname1" valign="top" nowrap> <em>user</em> </td>
1534 <td class="md" valign="top"> ) </td>
1535 <td class="md" nowrap><code> [virtual]</code></td>
1542 <table cellspacing=5 cellpadding=0 border=0>
1550 Called when a user quits.
1552 The details of the exiting user are available to you in the parameter userrec *user
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>.
1556 <div class="fragment"><pre>00309 { }
1560 <a name="a33" doxytag="Module::OnUserRegister"></a><p>
1561 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1564 <table cellpadding="0" cellspacing="0" border="0">
1566 <td class="md" nowrap valign="top"> void Module::OnUserRegister </td>
1567 <td class="md" valign="top">( </td>
1568 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
1569 <td class="mdname1" valign="top" nowrap> <em>user</em> </td>
1570 <td class="md" valign="top"> ) </td>
1571 <td class="md" nowrap><code> [virtual]</code></td>
1578 <table cellspacing=5 cellpadding=0 border=0>
1586 Called whenever a user is about to register their connection (e.g.
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.
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>.
1592 <div class="fragment"><pre>00337 { };
1596 <a name="a24" doxytag="Module::OnUserSync"></a><p>
1597 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1600 <table cellpadding="0" cellspacing="0" border="0">
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">( </td>
1604 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
1605 <td class="mdname1" valign="top" nowrap> <em>user</em> </td>
1606 <td class="md" valign="top"> ) </td>
1607 <td class="md" nowrap><code> [virtual]</code></td>
1614 <table cellspacing=5 cellpadding=0 border=0>
1622 Called during a netburst to sync user data.
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.
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>.
1628 References <a class="el" href="modules_8h-source.html#l00068">string_list</a>.
1630 <div class="fragment"><pre>00328 { <a class="code" href="modules_8h.html#a32">string_list</a> empty; <span class="keywordflow">return</span> empty; }
1634 <a name="a17" doxytag="Module::OnWhois"></a><p>
1635 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1638 <table cellpadding="0" cellspacing="0" border="0">
1640 <td class="md" nowrap valign="top"> void Module::OnWhois </td>
1641 <td class="md" valign="top">( </td>
1642 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
1643 <td class="mdname" nowrap> <em>source</em>, </td>
1648 <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> * </td>
1649 <td class="mdname" nowrap> <em>dest</em></td>
1653 <td class="md">) </td>
1654 <td class="md" colspan="2"><code> [virtual]</code></td>
1661 <table cellspacing=5 cellpadding=0 border=0>
1669 Called whenever a /WHOIS is performed on a local user.
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.
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>.
1675 <div class="fragment"><pre>00321 { };
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>