]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Revert "Fix sending the wrong numerics on join when a topic is empty."
authorAttila Molnar <attilamolnar@hush.com>
Sun, 11 Oct 2015 14:27:10 +0000 (16:27 +0200)
committerAttila Molnar <attilamolnar@hush.com>
Sun, 11 Oct 2015 14:27:10 +0000 (16:27 +0200)
This reverts commit b0e64b8cea2d721588d92072a8d16fdd99a9c945.

The original behavior isn't RFC incompliant, see #1095.

src/channels.cpp

index 6802e3d7dd7d049468dbe0ce6f52ad2a3171df20..9f1eafd0cb1f1e9654a8d3890310a46ac98af26a 100644 (file)
@@ -412,7 +412,7 @@ Channel* Channel::ForceChan(Channel* Ptr, User* user, const std::string &privs,
 
        if (IS_LOCAL(user))
        {
-               if (!Ptr->topic.empty())
+               if (Ptr->topicset)
                {
                        user->WriteNumeric(RPL_TOPIC, "%s %s :%s", user->nick.c_str(), Ptr->name.c_str(), Ptr->topic.c_str());
                        user->WriteNumeric(RPL_TOPICTIME, "%s %s %s %lu", user->nick.c_str(), Ptr->name.c_str(), Ptr->setby.c_str(), (unsigned long)Ptr->topicset);