X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_permchannels.cpp;h=766158a21f9705cb51017ef70bf8c21aa3bf3d5f;hb=e59cb85871f75b7603c63c6cd274d57536cf6794;hp=0f2a2ef6f3506c069fa6d0175bd462474e2ed2c0;hpb=d1df2bce56275e1297d94d82d4dbef6f6cf582b6;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp index 0f2a2ef6f..766158a21 100644 --- a/src/modules/m_permchannels.cpp +++ b/src/modules/m_permchannels.cpp @@ -34,7 +34,7 @@ class PermChannel : public ModeHandler oper = true; } - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string& parameter, bool adding) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string& parameter, bool adding) CXX11_OVERRIDE { if (adding == channel->IsModeSet(this)) return MODEACTION_DENY; @@ -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())) @@ -305,7 +305,7 @@ public: Version GetVersion() CXX11_OVERRIDE { - return Version("Provides support for channel mode +P to provide permanent channels",VF_VENDOR); + return Version("Provides channel mode +P to provide permanent channels", VF_VENDOR); } ModResult OnChannelPreDelete(Channel *c) CXX11_OVERRIDE