diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-05 22:47:46 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-05 22:47:46 +0000 |
commit | b6decc75f28e24522bfc4a3a74dbacce22d5cb02 (patch) | |
tree | 0c8a41bcf06ab31beebd385a02d93f301708203c /src/modules/m_spanningtree | |
parent | 3f647b9c1649d62c3a91da1723afec121f396ee5 (diff) |
Change OnPostLocalTopicChange to be OnPostTopicChange, invoked for both remote and local events. Will be needed for some xline trickery.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11677 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r-- | src/modules/m_spanningtree/main.cpp | 8 | ||||
-rw-r--r-- | src/modules/m_spanningtree/main.h | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index e074f71ef..726b0713e 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -45,7 +45,7 @@ ModuleSpanningTree::ModuleSpanningTree(InspIRCd* Me) Implementation eventlist[] = { - I_OnPreCommand, I_OnGetServerDescription, I_OnUserInvite, I_OnPostLocalTopicChange, + I_OnPreCommand, I_OnGetServerDescription, I_OnUserInvite, I_OnPostTopicChange, I_OnWallops, I_OnUserNotice, I_OnUserMessage, I_OnBackgroundTimer, I_OnUserJoin, I_OnChangeLocalUserHost, I_OnChangeName, I_OnChangeIdent, I_OnUserPart, I_OnUnloadModule, I_OnUserQuit, I_OnUserPostNick, I_OnUserKick, I_OnRemoteKill, I_OnRehash, I_OnPreRehash, @@ -446,8 +446,12 @@ void ModuleSpanningTree::OnUserInvite(User* source,User* dest,Channel* channel, } } -void ModuleSpanningTree::OnPostLocalTopicChange(User* user, Channel* chan, const std::string &topic) +void ModuleSpanningTree::OnPostTopicChange(User* user, Channel* chan, const std::string &topic) { + // Drop remote events on the floor. + if (!IS_LOCAL(user)) + return; + parameterlist params; params.push_back(chan->name); params.push_back(":"+topic); diff --git a/src/modules/m_spanningtree/main.h b/src/modules/m_spanningtree/main.h index 2a7248f48..04f281b28 100644 --- a/src/modules/m_spanningtree/main.h +++ b/src/modules/m_spanningtree/main.h @@ -162,7 +162,7 @@ class ModuleSpanningTree : public Module virtual void OnGetServerDescription(const std::string &servername,std::string &description); virtual void OnUserConnect(User* source); virtual void OnUserInvite(User* source,User* dest,Channel* channel, time_t); - virtual void OnPostLocalTopicChange(User* user, Channel* chan, const std::string &topic); + virtual void OnPostTopicChange(User* user, Channel* chan, const std::string &topic); virtual void OnWallops(User* user, const std::string &text); virtual void OnUserNotice(User* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list); virtual void OnUserMessage(User* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list); |