]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_denychans.cpp
Get rid of the OnRemoteKill hook, make use of GetRouting() and TR_CUSTOM to route...
[user/henk/code/inspircd.git] / src / modules / m_denychans.cpp
index 5c46b69ca4d95da3150bdf8a60d84287f170c7d7..b09ee7977d24d65a199db45debaef82bc988be7a 100644 (file)
 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);