aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/fjoin.cpp
diff options
context:
space:
mode:
authorGravatar Attila Molnar2016-04-11 15:53:01 +0200
committerGravatar Attila Molnar2016-04-11 15:53:01 +0200
commit2706a993b3f8ee52e2728047fad6a56f7e3cf405 (patch)
tree30d99f78630372bbe630fcf47f2f32fc8891fbe9 /src/modules/m_spanningtree/fjoin.cpp
parentMerge pull request #1168 from SaberUK/master+fix-configure-cache-parser (diff)
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
Diffstat (limited to 'src/modules/m_spanningtree/fjoin.cpp')
-rw-r--r--src/modules/m_spanningtree/fjoin.cpp9
1 files changed, 2 insertions, 7 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)