From 3f4b15c2cfe51a654b5167273f5a95b29e757cf1 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 14 Apr 2005 21:13:24 +0000 Subject: New documentation on today's new methods etc git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1096 e03df62e-2008-0410-955e-edbf42e46eb7 --- docs/module-doc/classModule.html | 356 +++++++++++++++++++++++++++++++++------ 1 file changed, 307 insertions(+), 49 deletions(-) (limited to 'docs/module-doc/classModule.html') diff --git a/docs/module-doc/classModule.html b/docs/module-doc/classModule.html index c861d87d2..d92491df6 100644 --- a/docs/module-doc/classModule.html +++ b/docs/module-doc/classModule.html @@ -54,54 +54,69 @@ Inherits classbase. virtual int OnUserPreJoin (userrec *user, chanrec *chan, const char *cname)  Called whenever a user is about to join a channel, before any processing is done.

-virtual void OnOper (userrec *user) +virtual int OnUserPreKick (userrec *source, userrec *user, chanrec *chan, std::string reason) - Called whenever a user opers locally.


-virtual void OnInfo (userrec *user) + Called whenever a user is about to be kicked.


+virtual void OnUserKick (userrec *source, userrec *user, chanrec *chan, std::string reason) - Called whenever a user types /INFO.


-virtual void OnWhois (userrec *source, userrec *dest) + Called whenever a user is kicked.


+virtual void OnOper (userrec *user) - Called whenever a /WHOIS is performed on a local user.


-virtual int OnUserPreInvite (userrec *source, userrec *dest, chanrec *channel) + Called whenever a user opers locally.


+virtual void OnInfo (userrec *user) - Called whenever a user is about to invite another user into a channel, before any processing is done.


-virtual int OnUserPreMessage (userrec *user, void *dest, int target_type, std::string &text) + Called whenever a user types /INFO.


+virtual void OnWhois (userrec *source, userrec *dest) - Called whenever a user is about to PRIVMSG A user or a channel, before any processing is done.


-virtual int OnUserPreNotice (userrec *user, void *dest, int target_type, std::string &text) + Called whenever a /WHOIS is performed on a local user.


+virtual int OnUserPreInvite (userrec *source, userrec *dest, chanrec *channel) - Called whenever a user is about to NOTICE A user or a channel, before any processing is done.


-virtual int OnUserPreNick (userrec *user, std::string newnick) + Called whenever a user is about to invite another user into a channel, before any processing is done.


+virtual int OnUserPreMessage (userrec *user, void *dest, int target_type, std::string &text) - Called before any nickchange, local or remote.


-virtual void OnUserPostNick (userrec *user, std::string oldnick) + Called whenever a user is about to PRIVMSG A user or a channel, before any processing is done.


+virtual int OnUserPreNotice (userrec *user, void *dest, int target_type, std::string &text) - Called after any nickchange, local or remote.


-virtual int OnAccessCheck (userrec *source, userrec *dest, chanrec *channel, int access_type) + Called whenever a user is about to NOTICE A user or a channel, before any processing is done.


+virtual int OnUserPreNick (userrec *user, std::string newnick) - Called before an action which requires a channel privilage check.


-virtual string_list OnUserSync (userrec *user) + Called before any nickchange, local or remote.


+virtual void OnUserPostNick (userrec *user, std::string oldnick) - Called during a netburst to sync user data.


-virtual string_list OnChannelSync (chanrec *chan) + Called after any nickchange, local or remote.


+virtual int OnAccessCheck (userrec *source, userrec *dest, chanrec *channel, int access_type) - Called during a netburst to sync channel data.


-virtual void On005Numeric (std::string &output) + Called before an action which requires a channel privilage check.


+virtual string_list OnUserSync (userrec *user) - Called when a 005 numeric is about to be output.


-virtual int OnKill (userrec *source, userrec *dest, std::string reason) + Called during a netburst to sync user data.


+virtual string_list OnChannelSync (chanrec *chan) - Called when a client is disconnected by KILL.


-virtual void OnLoadModule (Module *mod, std::string name) + Called during a netburst to sync channel data.


+virtual void On005Numeric (std::string &output) - Called whenever a module is loaded.


-virtual void OnBackgroundTimer (time_t curtime) + Called when a 005 numeric is about to be output.


+virtual int OnKill (userrec *source, userrec *dest, std::string reason) - Called once every five seconds for background processing.


-virtual void OnSendList (userrec *user, chanrec *channel, char mode) + Called when a client is disconnected by KILL.


+virtual void OnLoadModule (Module *mod, std::string name) - Called whenever a list is needed for a listmode.


+ Called whenever a module is loaded.


+virtual void OnBackgroundTimer (time_t curtime) + + Called once every five seconds for background processing.


+virtual void OnSendList (userrec *user, chanrec *channel, char mode) + + Called whenever a list is needed for a listmode.


+virtual int OnPreCommand (std::string command, char **parameters, int pcnt, userrec *user) + + Called whenever any command is about to be executed.


+virtual bool OnCheckReady (userrec *user) + + 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.


+virtual void OnUserRegister (userrec *user) + + Called whenever a user is about to register their connection (e.g.



Detailed Description

Base class for all InspIRCd modules This class is the base class for InspIRCd modules. @@ -219,7 +234,7 @@ References VF_VENDOR. -

+

@@ -255,7 +270,7 @@ Definition at line 330
-

+

@@ -326,7 +341,7 @@ References ACR_DEFAULT.
-

+

@@ -362,7 +377,7 @@ Definition at line 333
-

+

@@ -400,6 +415,42 @@ References string_list.
+

+ + + + +
+ + + + + + + + + + +
bool Module::OnCheckReady userrec user  )  [virtual]
+
+ + + + + +
+   + + +

+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. +

+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. +

+Definition at line 336 of file modules.cpp. +

+

00336 { return true; };
+

@@ -469,7 +520,7 @@ Definition at line 317
-

+

@@ -506,7 +557,7 @@ Definition at line 320
-

+

@@ -557,7 +608,7 @@ Definition at line 331
-

+

@@ -602,7 +653,7 @@ Definition at line 332
-

+

@@ -728,6 +779,63 @@ Definition at line 312
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int Module::OnPreCommand std::string  command,
char **  parameters,
int  pcnt,
userrec user
[virtual]
+
+ + + + + +
+   + + +

+Called whenever any command is about to be executed. +

+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 Server::QuitUser) 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!) +

+Definition at line 335 of file modules.cpp. +

+

00335 { return 0; };
+

@@ -763,7 +871,7 @@ Definition at line 314
-

+

@@ -946,6 +1054,63 @@ Definition at line 310
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Module::OnUserKick userrec source,
userrec user,
chanrec chan,
std::string  reason
[virtual]
+
+ + + + + +
+   + + +

+Called whenever a user is kicked. +

+If this method is called, the kick is already underway and cannot be prevented, so to prevent a kick, please use Module::OnUserPreKick instead of this method. +

+Definition at line 339 of file modules.cpp. +

+

00339 { };
+

@@ -991,7 +1156,7 @@ Definition at line 311
-

+

@@ -1036,7 +1201,7 @@ Definition at line 326
-

+

@@ -1140,7 +1305,64 @@ Definition at line 316
-

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int Module::OnUserPreKick userrec source,
userrec user,
chanrec chan,
std::string  reason
[virtual]
+
+ + + + + +
+   + + +

+Called whenever a user is about to be kicked. +

+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. +

+Definition at line 338 of file modules.cpp. +

+

00338 { return 0; };
+
+

@@ -1197,7 +1419,7 @@ Definition at line 323
-

+

@@ -1242,7 +1464,7 @@ Definition at line 325
-

+

@@ -1335,7 +1557,43 @@ Definition at line 309
-

+

+ + + + +
+ + + + + + + + + + +
void Module::OnUserRegister userrec user  )  [virtual]
+
+ + + + + +
+   + + +

+Called whenever a user is about to register their connection (e.g. +

+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. +

+Definition at line 337 of file modules.cpp. +

+

00337 { };
+
+

@@ -1373,7 +1631,7 @@ References string_list.
-

+

@@ -1420,7 +1678,7 @@ Definition at line 321


The documentation for this class was generated from the following files: -
Generated on Wed Apr 13 13:07:06 2005 for InspIRCd by +
Generated on Thu Apr 14 21:12:10 2005 for InspIRCd by doxygen 1.3.3
-- cgit v1.2.3