summaryrefslogtreecommitdiff
path: root/include/modules.h
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-05-22 20:41:16 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-05-22 20:41:16 +0000
commitda8fe330c2b3445b370cb80ecae93c7fb34d441d (patch)
tree4b6ef238c206d3440b36827b847fd3895dc300f8 /include/modules.h
parent38c9d65253a67dbe13c77792027a9db601735813 (diff)
Added support for changing of text within OnUserPreNotice and OnUserPreMessage (required for modes +G and +S etc)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@821 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/modules.h')
-rw-r--r--include/modules.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/modules.h b/include/modules.h
index caea6e421..dc17b99c0 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -263,7 +263,7 @@ class Module : public classbase
* 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.
*/
- virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string text);
+ virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text);
/** Called whenever a user is about to NOTICE A user or a channel, before any processing is done.
* Returning any nonzero value from this function stops the process immediately, causing no
@@ -272,8 +272,11 @@ class Module : public classbase
* 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.
*/
- virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string text);
+ virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text);
/** Called before any nickchange, local or remote. This can be used to implement Q-lines etc.
* Please note that although you can see remote nickchanges through this function, you should
@@ -281,6 +284,9 @@ class Module : public classbase
* 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.
+ * 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.
*/
virtual int OnUserPreNick(userrec* user, std::string newnick);
@@ -305,8 +311,8 @@ class Module : public classbase
* 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).
*/
-
virtual int OnAccessCheck(userrec* source,userrec* dest,chanrec* channel,int access_type);
+
/** Called during a netburst to sync user data.
* 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