diff options
-rw-r--r-- | include/modules.h | 3 | ||||
-rw-r--r-- | src/commands.cpp | 1 | ||||
-rw-r--r-- | src/modules.cpp | 2 |
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 |