]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/fjoin.cpp
Refactor topic setting logic to go through Channel::SetTopic() in all cases
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / fjoin.cpp
index 74590adf8f6eaa0f959f3796877101df67de4a74..40ba5e893e43eb15d876c906356c869fc489ecd2 100644 (file)
@@ -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)