]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Added OnPostLocalTopic
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Wed, 30 Nov 2005 11:42:53 +0000 (11:42 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Wed, 30 Nov 2005 11:42:53 +0000 (11:42 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2042 e03df62e-2008-0410-955e-edbf42e46eb7

include/modules.h
src/commands.cpp
src/modules.cpp

index 6c556e841b662055e685e5afeb23c888b6211aba..b61e75b07756137202c22d4cf2681cb4c9fedc53 100644 (file)
@@ -620,6 +620,8 @@ class Module : public classbase
         */
        virtual int OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic);
 
         */
        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()
        /** 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()
index 6be68328e7985a0ed5140f4b3b98de49f4415841..c9bddbcd868bef702f2c8b902bcf45e62b38ee11 100644 (file)
@@ -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);
                                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
                        {
                        }
                        else
                        {
index 551a6ca98ae44cf9a1221edee03a6fde41cca268..8d8f66ae93c3f44f93fe7fc40b5a4985cc3429f8 100644 (file)
@@ -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::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
 
 // server is a wrapper class that provides methods to all of the C-style
 // exports in the core