summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-11-30 11:42:53 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-11-30 11:42:53 +0000
commitd7205720a51b0cb389ab43e80aa045576ed26b1e (patch)
tree6d77675df83b46a8ccfd08d14f5d571061becdb4
parentb9dd561f19e5f57c06e54c966fa198f8654e61d4 (diff)
Added OnPostLocalTopic
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2042 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--include/modules.h2
-rw-r--r--src/commands.cpp5
-rw-r--r--src/modules.cpp1
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