diff options
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r-- | src/modules/m_spanningtree/fjoin.cpp | 9 | ||||
-rw-r--r-- | src/modules/m_spanningtree/ftopic.cpp | 14 |
2 files changed, 3 insertions, 20 deletions
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) diff --git a/src/modules/m_spanningtree/ftopic.cpp b/src/modules/m_spanningtree/ftopic.cpp index 3c76c928a..de72d162a 100644 --- a/src/modules/m_spanningtree/ftopic.cpp +++ b/src/modules/m_spanningtree/ftopic.cpp @@ -63,19 +63,7 @@ CmdResult CommandFTopic::Handle(User* user, std::vector<std::string>& params) return CMD_FAILURE; } - if (c->topic != newtopic) - { - // Update topic only when it differs from current topic - c->topic.assign(newtopic, 0, ServerInstance->Config->Limits.MaxTopic); - c->WriteChannel(user, "TOPIC %s :%s", c->name.c_str(), c->topic.c_str()); - } - - // Update setter and settime - c->setby.assign(setter, 0, 128); - c->topicset = ts; - - FOREACH_MOD(OnPostTopicChange, (user, c, c->topic)); - + c->SetTopic(user, newtopic, ts, &setter); return CMD_SUCCESS; } |