X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_denychans.cpp;h=b09ee7977d24d65a199db45debaef82bc988be7a;hb=623ba6ae49f8e1e0958f921fa178af8a95797c1c;hp=5c46b69ca4d95da3150bdf8a60d84287f170c7d7;hpb=23e8bba13c55d33ce89d505780da36c9589e300a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_denychans.cpp b/src/modules/m_denychans.cpp index 5c46b69ca..b09ee7977 100644 --- a/src/modules/m_denychans.cpp +++ b/src/modules/m_denychans.cpp @@ -27,13 +27,13 @@ class ModuleDenyChannels : public Module { public: - void init() + void init() CXX11_OVERRIDE { Implementation eventlist[] = { I_OnUserPreJoin, I_OnRehash }; ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } - virtual void OnRehash(User* user) + void OnRehash(User* user) CXX11_OVERRIDE { /* check for redirect validity and loops/chains */ ConfigTagList tags = ServerInstance->Config->ConfTags("badchan"); @@ -45,7 +45,7 @@ class ModuleDenyChannels : public Module if (!redirect.empty()) { - if (!ServerInstance->IsChannel(redirect, ServerInstance->Config->Limits.ChanMax)) + if (!ServerInstance->IsChannel(redirect)) { if (user) user->WriteNotice("Invalid badchan redirect '" + redirect + "'"); @@ -77,13 +77,13 @@ class ModuleDenyChannels : public Module } } - virtual Version GetVersion() + Version GetVersion() CXX11_OVERRIDE { return Version("Implements config tags which allow blocking of joins to channels", VF_VENDOR); } - ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven) + ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven) CXX11_OVERRIDE { ConfigTagList tags = ServerInstance->Config->ConfTags("badchan"); for (ConfigIter j = tags.first; j != tags.second; ++j) @@ -108,7 +108,7 @@ class ModuleDenyChannels : public Module } } - if (ServerInstance->IsChannel(redirect.c_str(), ServerInstance->Config->Limits.ChanMax)) + if (ServerInstance->IsChannel(redirect)) { /* simple way to avoid potential loops: don't redirect to +L channels */ Channel *newchan = ServerInstance->FindChan(redirect);