diff options
author | Adam <Adam@anope.org> | 2015-01-28 22:57:15 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2015-01-28 22:57:15 -0500 |
commit | 845ca576b4c5a94f0a3ec12a4dd524a7d017155e (patch) | |
tree | 2636bc0ccdf94f957a955277dd89155de49360b6 /modules/commands/cs_topic.cpp | |
parent | 2264a206d262f07f6c6d91df867383d6413e0c3f (diff) |
More properly track topic change sources and allow users with access to change topics through topiclock
Diffstat (limited to 'modules/commands/cs_topic.cpp')
-rw-r--r-- | modules/commands/cs_topic.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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); } |