From abdb186046bcdd83aefbc4171a00bd1ad7ec963c Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 3 Apr 2004 15:46:53 +0000 Subject: Added support for module-defined chanmodes with no parameters Fixed minor typo in example conf Added new stylesheet and docs git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@362 e03df62e-2008-0410-955e-edbf42e46eb7 --- docs/module-doc/classModule.html | 188 ++++++++++++++++++++++++++------------- 1 file changed, 124 insertions(+), 64 deletions(-) (limited to 'docs/module-doc/classModule.html') diff --git a/docs/module-doc/classModule.html b/docs/module-doc/classModule.html index 03cd1ca52..2a212a72e 100644 --- a/docs/module-doc/classModule.html +++ b/docs/module-doc/classModule.html @@ -1,7 +1,7 @@ Module class Reference - +
@@ -36,16 +36,18 @@ Inheritance diagram for Module:



virtual void OnUserPart (userrec *user, chanrec *channel)  Called when a user parts a channel.

-virtual void Module::OnPacketTransmit (char *p) +virtual void OnPacketTransmit (char *p)  Called before a packet is transmitted across the irc network between two irc servers.

-virtual void Module::OnPacketReceive (char *p) +virtual void OnPacketReceive (char *p)  Called after a packet is received from another irc server.

virtual void OnRehash ()  Called on rehash.

virtual void OnServerRaw (std::string &raw, bool inbound)  Called when a raw command is transmitted or received.

-virtual bool OnExtendedMode (userrec *user, chanrec *chan, char modechar, int type, bool mode_on, string_list &params) +virtual bool OnExtendedMode (userrec *user, chanrec *chan, 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) + Called whenever a user is about to join a channel, before any processing is done.


Detailed Description

Base class for all InspIRCd modules This class is the base class for InspIRCd modules. @@ -54,7 +56,7 @@ All modules must inherit from this class, its methods will be called when irc se

-Definition at line 72 of file modules.h.


Constructor & Destructor Documentation

+Definition at line 90 of file modules.h.

Constructor & Destructor Documentation

@@ -84,9 +86,9 @@ Default constructor creates a module class.

-Definition at line 88 of file modules.cpp. +Definition at line 93 of file modules.cpp.

-

00088 { }
+
00093 { }
 
@@ -119,9 +121,9 @@ Default destructor destroys a module class.

-Definition at line 89 of file modules.cpp. +Definition at line 94 of file modules.cpp.

-

00089 { }
+
00094 { }
 
@@ -155,55 +157,39 @@ Returns the version number of a Module.

The method should return a Version object with its version information assigned via Version::Version

-Definition at line 99 of file modules.cpp. +Definition at line 105 of file modules.cpp.

-

00099 { return Version(1,0,0,0); }
+
00105 { return Version(1,0,0,0); }
 
-

+

- -
- + - - - - + + - -
virtual void Module::Module::OnPacketReceive virtual int Module::Module::OnUserPreJoin char *   p [virtual]userrec  user,
-
- - - - - -
-   - - -

-Called after a packet is received from another irc server. -

-The packet is represented as a char*, as it should be regarded as a buffer, and not a string. 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.

-

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

- - - - - - - + + + + + + + + + + + + + + +
virtual void Module::Module::OnPacketTransmit char *   p [virtual]chanrec  chan,
char *   cname
[virtual]
@@ -218,9 +204,11 @@ The packet is represented as a char*, as it should be regarded as a buffer, and

-Called before a packet is transmitted across the irc network between two irc servers. +Called whenever a user is about to join a channel, before any processing is done.

-The packet is represented as a char*, as it should be regarded as a buffer, and not a string. 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.

@@ -261,7 +249,7 @@ The packet is represented as a char*, as it should be regarded as a buffer, and - string_list &  + string_list &    params @@ -286,9 +274,81 @@ Called whenever an extended mode is to be processed.

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 Server::AddExtendedMode If the mode is not a channel mode, chanrec* chan is null, and should not be read from or written to.

-Definition at line 98 of file modules.cpp. +Definition at line 104 of file modules.cpp.

-

00098 { }
+
00104 { }
+
+ + +

+ + + + +
+ + + + + + + + + + +
void Module::OnPacketReceive char *   p [virtual]
+
+ + + + + +
+   + + +

+Called after a packet is received from another irc server. +

+The packet is represented as a char*, as it should be regarded as a buffer, and not a string. 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. +

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

+

00100 { }
+
+

+ + + + +
+ + + + + + + + + + +
void Module::OnPacketTransmit char *   p [virtual]
+
+ + + +
+   + + +

+Called before a packet is transmitted across the irc network between two irc servers. +

+The packet is represented as a char*, as it should be regarded as a buffer, and not a string. 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. +

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

+

00099 { }
 
@@ -321,9 +381,9 @@ Called on rehash.

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.

-Definition at line 96 of file modules.cpp. +Definition at line 101 of file modules.cpp.

-

00096 { }
+
00101 { }
 
@@ -366,9 +426,9 @@ Called when a raw command is transmitted or received.

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.

-Definition at line 97 of file modules.cpp. +Definition at line 102 of file modules.cpp.

-

00097 { }
+
00102 { }
 
@@ -402,9 +462,9 @@ Called when a user connects.

The details of the connecting user are available to you in the parameter userrec *user

-Definition at line 90 of file modules.cpp. +Definition at line 95 of file modules.cpp.

-

00090 { }
+
00095 { }
 
@@ -447,9 +507,9 @@ Called when a user joins a channel.

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

-Definition at line 92 of file modules.cpp. +Definition at line 97 of file modules.cpp.

-

00092 { }
+
00097 { }
 
@@ -492,9 +552,9 @@ Called when a user parts a channel.

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

-Definition at line 93 of file modules.cpp. +Definition at line 98 of file modules.cpp.

-

00093 { }
+
00098 { }
 
@@ -528,15 +588,15 @@ Called when a user quits.

The details of the exiting user are available to you in the parameter userrec *user

-Definition at line 91 of file modules.cpp. +Definition at line 96 of file modules.cpp.

-

00091 { }
+
00096 { }
 

The documentation for this class was generated from the following files: -
Generated on Fri Apr 2 14:46:18 2004 for InspIRCd by +
Generated on Sat Apr 3 16:36:16 2004 for InspIRCd by doxygen1.3-rc3
-- cgit v1.2.3