]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_permchannels.cpp
Fix broken linking over IPv4 on IPv6 capable systems.
[user/henk/code/inspircd.git] / src / modules / m_permchannels.cpp
index 7e28c5fc65081dbbff95af4ba0455cec8f58a38d..dc250e0d854aab79adb2543c9123a6342e62dbb7 100644 (file)
@@ -193,9 +193,9 @@ public:
                        std::string channel = tag->getString("channel");
                        std::string modes = tag->getString("modes");
 
-                       if ((channel.empty()) || (channel.length() > ServerInstance->Config->Limits.ChanMax))
+                       if (!ServerInstance->IsChannel(channel))
                        {
-                               ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Ignoring permchannels tag with empty or too long channel name (\"" + channel + "\")");
+                               ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Ignoring permchannels tag with invalid channel name (\"" + channel + "\")");
                                continue;
                        }
 
@@ -206,7 +206,7 @@ public:
                                time_t TS = tag->getInt("ts", ServerInstance->Time(), 1);
                                c = new Channel(channel, TS);
 
-                               unsigned int topicset = tag->getInt("topicts");
+                               time_t topicset = tag->getInt("topicts", 0);
                                std::string topic = tag->getString("topic");
 
                                if ((topicset != 0) || (!topic.empty()))