]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_denychans.cpp
Fix dccallow to work with files with spaces in their names
[user/henk/code/inspircd.git] / src / modules / m_denychans.cpp
index c280174f52fca174555e474937e3fcd1515211ef..39d9e0d34024103fc7caad894f8d295a59a592e7 100644 (file)
 class ModuleDenyChannels : public Module
 {
  public:
-       ModuleDenyChannels()    {
+       void init()
+       {
                Implementation eventlist[] = { I_OnUserPreJoin, I_OnRehash };
-               ServerInstance->Modules->Attach(eventlist, this, 2);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
        virtual void OnRehash(User* user)
@@ -56,7 +57,7 @@ class ModuleDenyChannels : public Module
                                        if (InspIRCd::Match(redirect, j->second->getString("name")))
                                        {
                                                bool goodchan = false;
-                                               ConfigTagList goodchans = ServerInstance->Config->ConfTags("badchan");
+                                               ConfigTagList goodchans = ServerInstance->Config->ConfTags("goodchan");
                                                for (ConfigIter k = goodchans.first; k != goodchans.second; ++k)
                                                {
                                                        if (InspIRCd::Match(redirect, k->second->getString("name")))