diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-09-29 11:16:07 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-09-29 11:16:07 +0000 |
commit | 8c470e0b44b412854ac06205cacb6cf05d6483af (patch) | |
tree | 899186d918442a1acf582c7f72bd62b731cf3e98 /src/modules/m_permchannels.cpp | |
parent | d28ea800260665af77bedf267f83c8518117a114 (diff) |
Make topic optional for permanent channels tags.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10610 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_permchannels.cpp')
-rw-r--r-- | src/modules/m_permchannels.cpp | 7 |
1 files 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()) |