From 8c470e0b44b412854ac06205cacb6cf05d6483af Mon Sep 17 00:00:00 2001 From: w00t Date: Mon, 29 Sep 2008 11:16:07 +0000 Subject: [PATCH] Make topic optional for permanent channels tags. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10610 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_permchannels.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp index 6a5373009..3b3df4d26 100644 --- a/src/modules/m_permchannels.cpp +++ b/src/modules/m_permchannels.cpp @@ -107,9 +107,9 @@ public: std::string topic = MyConf.ReadValue("permchannels", "topic", i); std::string modes = MyConf.ReadValue("permchannels", "modes", i); - if (channel.empty() || topic.empty()) + if (channel.empty()) { - ServerInstance->Logs->Log("blah", DEBUG, "Malformed permchannels tag with empty topic or channel name."); + ServerInstance->Logs->Log("blah", DEBUG, "Malformed permchannels tag with empty channel name."); continue; } @@ -118,7 +118,8 @@ public: if (!c) { c = new Channel(ServerInstance, channel, ServerInstance->Time()); - c->SetTopic(NULL, topic, true); + if (!topic.empty()) + c->SetTopic(NULL, topic, true); ServerInstance->Logs->Log("blah", DEBUG, "Added %s with topic %s", channel.c_str(), topic.c_str()); if (modes.empty()) -- 2.39.5