From 1d994c544474da53159257d9097997c0744a48a5 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 6 Apr 2004 10:43:34 +0000 Subject: Added support for SVS-style Server class methods for modules git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@400 e03df62e-2008-0410-955e-edbf42e46eb7 --- docs/module-doc/classModule.html | 160 ++++++++++++++++++++++++++++++++++----- 1 file changed, 142 insertions(+), 18 deletions(-) (limited to 'docs/module-doc/classModule.html') diff --git a/docs/module-doc/classModule.html b/docs/module-doc/classModule.html index a055fef1e..5e85deac7 100644 --- a/docs/module-doc/classModule.html +++ b/docs/module-doc/classModule.html @@ -46,8 +46,14 @@ Inheritance diagram for Module:



virtual bool OnExtendedMode (userrec *user, void *target, char modechar, int type, bool mode_on, string_list &params)  Called whenever an extended mode is to be processed.

-virtual int Module::OnUserPreJoin (userrec *user, chanrec *chan, char *cname) +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) + Called whenever a user opers locally.

+virtual void OnInfo (userrec *user) + Called whenever a user types /INFO.

+void Module::OnWhois (userrec *source, userrec *dest) + Called whenever a /WHOIS is performed on a local user.


Detailed Description

Base class for all InspIRCd modules This class is the base class for InspIRCd modules. @@ -163,33 +169,27 @@ Definition at line 119 -

+

+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.
- + - - - - - - - + - - + + - +
virtual int Module::Module::OnUserPreJoin void Module::Module::OnWhois userrec  user,
chanrec  chan,   source,
char *   cnameuserrec  dest
[virtual]
@@ -204,11 +204,9 @@ Definition at line 119

-Called whenever a user is about to join a channel, before any processing is done. +Called whenever a /WHOIS is performed on a local user.

-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 mimic +b, +k, +l etc.

-IMPORTANT NOTE!

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

@@ -280,6 +278,79 @@ Definition at line 118 +

+ + + + +
+ + + + + + + + + + +
void Module::OnInfo userrec  user [virtual]
+
+ + + + + +
+   + + +

+Called whenever a user types /INFO. +

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

+:information here +

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

+

00121 { };
+
+

+ + + + +
+ + + + + + + + + + +
void Module::OnOper userrec  user [virtual]
+
+ + + + + +
+   + + +

+Called whenever a user opers locally. +

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

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

+

00120 { };
+

@@ -558,6 +629,59 @@ Definition at line 112
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
int Module::OnUserPreJoin userrec  user,
chanrec  chan,
const char *   cname
[virtual]
+
+ + + + + +
+   + + +

+Called whenever a user is about to join a channel, before any processing is done. +

+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 mimic +b, +k, +l etc.

+IMPORTANT NOTE!

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

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

+

00117 { return 0; }
+

@@ -596,7 +720,7 @@ Definition at line 110


The documentation for this class was generated from the following files: -
Generated on Mon Apr 5 02:04:07 2004 for InspIRCd by +
Generated on Tue Apr 6 11:42:45 2004 for InspIRCd by doxygen1.3-rc3
-- cgit v1.2.3