From 2706a993b3f8ee52e2728047fad6a56f7e3cf405 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Mon, 11 Apr 2016 15:53:01 +0200 Subject: Refactor topic setting logic to go through Channel::SetTopic() in all cases - Pass topic set time and optionally the setter to SetTopic() - Don't do anything if the topic is changed by a local user to what it is currently --- src/modules/m_spanningtree/fjoin.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/modules/m_spanningtree/fjoin.cpp') diff --git a/src/modules/m_spanningtree/fjoin.cpp b/src/modules/m_spanningtree/fjoin.cpp index 74590adf8..40ba5e893 100644 --- a/src/modules/m_spanningtree/fjoin.cpp +++ b/src/modules/m_spanningtree/fjoin.cpp @@ -278,14 +278,9 @@ void CommandFJoin::LowerTS(Channel* chan, time_t TS, const std::string& newname) // Unset all extensions chan->FreeAllExtItems(); - // Clear the topic, if it isn't empty then send a topic change message to local users - if (!chan->topic.empty()) - { - chan->topic.clear(); - chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "TOPIC %s :", chan->name.c_str()); - } + // Clear the topic + chan->SetTopic(ServerInstance->FakeClient, std::string(), 0); chan->setby.clear(); - chan->topicset = 0; } CommandFJoin::Builder::Builder(Channel* chan, TreeServer* source) -- cgit v1.3.1-10-gc9f91