From 845ca576b4c5a94f0a3ec12a4dd524a7d017155e Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 28 Jan 2015 22:57:15 -0500 Subject: More properly track topic change sources and allow users with access to change topics through topiclock --- modules/commands/cs_topic.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/commands/cs_topic.cpp') diff --git a/modules/commands/cs_topic.cpp b/modules/commands/cs_topic.cpp index 1506bcc9c..353cf83a3 100644 --- a/modules/commands/cs_topic.cpp +++ b/modules/commands/cs_topic.cpp @@ -227,7 +227,7 @@ class CSTopic : public Module } } - void OnTopicUpdated(Channel *c, const Anope::string &user, const Anope::string &topic) anope_override + void OnTopicUpdated(User *source, Channel *c, const Anope::string &user, const Anope::string &topic) anope_override { if (!c->ci) return; @@ -237,7 +237,7 @@ class CSTopic : public Module * This desyncs what is really set with what we have stored, and we end up resetting the topic often when * it is not required */ - if (topiclock.HasExt(c->ci) && c->ci->last_topic != c->topic) + if (topiclock.HasExt(c->ci) && c->ci->last_topic != c->topic && (!source || !c->ci->AccessFor(source).HasPriv("TOPIC"))) { c->ChangeTopic(c->ci->last_topic_setter, c->ci->last_topic, c->ci->last_topic_time); } -- cgit