]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_denychans.cpp
Now has no strchr() at all.
[user/henk/code/inspircd.git] / src / modules / m_denychans.cpp
index 709a285a05f54287a884c2ed98d5d62b40fff215..ba66d2294e29c547000abb43b6a8a585e5995e7b 100644 (file)
@@ -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;
                                }