]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
m_spanningtree Netburst: If a topic was ever set, send it even if it's empty
authorattilamolnar <attilamolnar@hush.com>
Sat, 13 Apr 2013 15:15:56 +0000 (17:15 +0200)
committerattilamolnar <attilamolnar@hush.com>
Sat, 13 Apr 2013 15:15:56 +0000 (17:15 +0200)
A new but empty topic should override a non-empty old topic

src/modules/m_spanningtree/netburst.cpp

index a77623bfce10dcd9590a417670d6ce877b8ed6af..d37584dad45cb933b2f890c2f1ba4bc3708bba96 100644 (file)
@@ -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);