From c06507029d0e84ed9805ca03d7296b170b3a5203 Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Sat, 13 Apr 2013 17:15:56 +0200 Subject: m_spanningtree Netburst: If a topic was ever set, send it even if it's empty A new but empty topic should override a non-empty old topic --- src/modules/m_spanningtree/netburst.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/modules/m_spanningtree') diff --git a/src/modules/m_spanningtree/netburst.cpp b/src/modules/m_spanningtree/netburst.cpp index a77623bfc..d37584dad 100644 --- a/src/modules/m_spanningtree/netburst.cpp +++ b/src/modules/m_spanningtree/netburst.cpp @@ -159,7 +159,10 @@ void TreeSocket::SyncChannel(Channel* chan) char data[MAXBUF]; SendFJoins(chan); - if (!chan->topic.empty()) + + // If the topic was ever set, send it, even if it's empty now + // because a new empty topic should override an old non-empty topic + if (chan->topicset != 0) { snprintf(data,MAXBUF,":%s FTOPIC %s %lu %lu %s :%s", ServerInstance->Config->GetSID().c_str(), chan->name.c_str(), (unsigned long) chan->age, (unsigned long)chan->topicset, chan->setby.c_str(), chan->topic.c_str()); this->WriteLine(data); -- cgit v1.2.3