]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_denychans.cpp
AMD64 warning 'fix' which tested fine when I added it seems to now...stop things...
[user/henk/code/inspircd.git] / src / modules / m_denychans.cpp
index 709a285a05f54287a884c2ed98d5d62b40fff215..c838a495d9eb4ce9dc82e0610c9a4c29e22705f3 100644 (file)
@@ -36,7 +36,7 @@ class ModuleDenyChannels : public Module
                Conf = new ConfigReader;
        }
        
-       virtual void OnRehash(std::string param)
+       virtual void OnRehash(const std::string &param)
        {
                delete Conf;
                Conf = new ConfigReader;
@@ -59,15 +59,13 @@ class ModuleDenyChannels : public Module
 
         virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname)
         {
-               bool isoper = strchr(user->modes,'o') ? true : false;
-
                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 ((Conf->ReadFlag("badchan","allowopers",j)) && isoper == true)
+                               if ((Conf->ReadFlag("badchan","allowopers",j)) && *user->oper)
                                {
                                        return 0;
                                }