From b49d529981f4336347c5f7c17d8ce656ad50b1e5 Mon Sep 17 00:00:00 2001 From: w00t Date: Sat, 5 Sep 2009 22:48:00 +0000 Subject: Likewise, convert OnLocalTopicChange to OnPreTopicChange and to be run for both local and remote changes, for API consistency. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11678 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_override.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/modules/m_override.cpp') diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp index ae18803d3..d0ec5d8fe 100644 --- a/src/modules/m_override.cpp +++ b/src/modules/m_override.cpp @@ -41,7 +41,7 @@ class ModuleOverride : public Module } OverriddenMode = OverOther = false; OverOps = OverDeops = OverVoices = OverDevoices = OverHalfops = OverDehalfops = 0; - Implementation eventlist[] = { I_OnRehash, I_OnAccessCheck, I_On005Numeric, I_OnUserPreJoin, I_OnUserPreKick, I_OnPostCommand, I_OnLocalTopicChange, I_OnRequest }; + Implementation eventlist[] = { I_OnRehash, I_OnAccessCheck, I_On005Numeric, I_OnUserPreJoin, I_OnUserPreKick, I_OnPostCommand, I_OnPreTopicChange, I_OnRequest }; ServerInstance->Modules->Attach(eventlist, this, 8); } @@ -116,9 +116,9 @@ class ModuleOverride : public Module } - virtual ModResult OnLocalTopicChange(User *source, Channel *channel, const std::string &topic) + virtual ModResult OnPreTopicChange(User *source, Channel *channel, const std::string &topic) { - if (IS_OPER(source) && CanOverride(source, "TOPIC")) + if (IS_LOCAL(source) && IS_OPER(source) && CanOverride(source, "TOPIC")) { if (!channel->HasUser(source) || (channel->IsModeSet('t') && channel->GetStatus(source) < STATUS_HOP)) { -- cgit v1.2.3