diff options
-rw-r--r-- | include/modules.h | 2 | ||||
-rw-r--r-- | src/commands.cpp | 5 | ||||
-rw-r--r-- | src/modules.cpp | 1 |
3 files changed, 7 insertions, 1 deletions
diff --git a/include/modules.h b/include/modules.h index 6c556e841..b61e75b07 100644 --- a/include/modules.h +++ b/include/modules.h @@ -620,6 +620,8 @@ class Module : public classbase */ virtual int OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic); + virtual void OnPostLocalTopicChange(userrec* user, chanrec* chan, std::string topic); + /** Called whenever an Event class is sent to all module by another module. * Please see the documentation of Event::Send() for further information. The Event sent can * always be assumed to be non-NULL, you should *always* check the value of Event::GetEventID() diff --git a/src/commands.cpp b/src/commands.cpp index 6be68328e..c9bddbcd8 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -529,7 +529,10 @@ void handle_topic(char **parameters, int pcnt, userrec *user) strlcpy(Ptr->setby,user->nick,NICKMAX); Ptr->topicset = TIME; WriteChannel(Ptr,user,"TOPIC %s :%s",Ptr->name, Ptr->topic); - + if (!strcasecmp(user->server,ServerName)) + { + FOREACH_MOD OnPostLocalTopicChange(user,Ptr,topic) + } } else { diff --git a/src/modules.cpp b/src/modules.cpp index 551a6ca98..8d8f66ae9 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -364,6 +364,7 @@ void Module::OnUserMessage(userrec* user, void* dest, int target_type, std::str void Module::OnUserNotice(userrec* user, void* dest, int target_type, std::string text) { }; void Module::OnRemoteKill(userrec* source, userrec* dest, std::string reason) { }; void Module::OnUserInvite(userrec* source,userrec* dest,chanrec* channel) { }; +void Module::OnPostLocalTopicChange(userrec* user, chanrec* chan, std::string topic) { }; // server is a wrapper class that provides methods to all of the C-style // exports in the core |