summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-04 17:46:37 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-04 17:46:37 +0000
commit7da84f2e706347b71e8d8056b2780cb8b47bfc03 (patch)
tree8a96b467622d941263f9b9c17017a2f00bd2c7c9
parent0cdc0d89af6a1121c8a17ac7e4de914c3e4fbbec (diff)
Added OnWallops
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2155 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--include/modules.h3
-rw-r--r--src/commands.cpp1
-rw-r--r--src/modules.cpp2
3 files changed, 4 insertions, 2 deletions
diff --git a/include/modules.h b/include/modules.h
index 9e3206736..35a4caf52 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -419,6 +419,7 @@ class Module : public classbase
* If your method returns nonzero, the nickchange is silently forbidden, and it is down to your
* module to generate some meaninful output.
*/
+ virtual int OnUserPreNick(userrec* user, std::string newnick);
virtual void OnUserMessage(userrec* user, void* dest, int target_type, std::string text);
@@ -434,7 +435,7 @@ class Module : public classbase
virtual void ProtoSendMode(void* opaque, int target_type, void* target, std::string modeline);
- virtual int OnUserPreNick(userrec* user, std::string newnick);
+ virtual void OnWallops(userrec* user, std::string text);
/** Called after any nickchange, local or remote. 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
diff --git a/src/commands.cpp b/src/commands.cpp
index f59901772..c7c2b8e9a 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -1088,6 +1088,7 @@ void handle_who(char **parameters, int pcnt, userrec *user)
void handle_wallops(char **parameters, int pcnt, userrec *user)
{
WriteWallOps(user,false,"%s",parameters[0]);
+ FOREACH_MOD OnWallops(user,parameters[0]);
}
void handle_list(char **parameters, int pcnt, userrec *user)
diff --git a/src/modules.cpp b/src/modules.cpp
index ae06ee10e..984f9f5be 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -367,7 +367,7 @@ void Module::OnGetServerDescription(std::string servername,std::string &descrip
void Module::OnSyncUser(userrec* user, Module* proto, void* opaque) { };
void Module::OnSyncChannel(chanrec* chan, Module* proto, void* opaque) { };
void Module::ProtoSendMode(void* opaque, int target_type, void* target, std::string modeline) { };
-
+void OnWallops(userrec* user, std::string text) { };
// server is a wrapper class that provides methods to all of the C-style
// exports in the core