]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_denychans.cpp
Added ability to send and receive a challenge, dont do anything with it yet
[user/henk/code/inspircd.git] / src / modules / m_denychans.cpp
index f7af72486bfc0205904233adc2b8dc2d2ab54ca8..3646690fb853ca51bd29025f638cb063a590b5e1 100644 (file)
@@ -15,8 +15,8 @@
 #include "channels.h"
 #include "modules.h"
 #include "hashcomp.h"
-
 #include "inspircd.h"
+#include "wildcard.h"
 
 /* $ModDesc: Implements config tags which allow blocking of joins to channels */
 
@@ -34,12 +34,12 @@ class ModuleDenyChannels : public Module
                Conf = new ConfigReader(ServerInstance);
        }
        
-       virtual void OnRehash(const std::string &param)
+       virtual void OnRehash(userrec* user, const std::string &param)
        {
                DELETE(Conf);
                Conf = new ConfigReader(ServerInstance);
        }
-       
+
        virtual ~ModuleDenyChannels()
        {
                DELETE(Conf);
@@ -59,9 +59,7 @@ class ModuleDenyChannels : public Module
        {
                for (int j =0; j < Conf->Enumerate("badchan"); j++)
                {
-                       irc::string cn = Conf->ReadValue("badchan","name",j).c_str();
-                       irc::string thischan = cname;
-                       if (thischan == cn)
+                       if (match(cname, Conf->ReadValue("badchan","name",j).c_str()))
                        {
                                if ((Conf->ReadFlag("badchan","allowopers",j)) && *user->oper)
                                {