]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_operchans.cpp
Add initial query support to m_mysql [patch by Athenon]
[user/henk/code/inspircd.git] / src / modules / m_operchans.cpp
index f714e00f6f8bcbeec310fe12b301a86255e3d427..52d5a28be16ee7d79aa3a319123930acdc4739a2 100644 (file)
@@ -58,23 +58,23 @@ class ModuleOperChans : public Module
                ServerInstance->Modules->Attach(eventlist, this, 2);
        }
 
-       virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
+       virtual ModResult OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
        {
                if (chan && chan->IsModeSet('O') && !IS_OPER(user))
                {
                        user->WriteNumeric(ERR_CANTJOINOPERSONLY, "%s %s :Only IRC operators may join %s (+O is set)",
                                user->nick.c_str(), chan->name.c_str(), chan->name.c_str());
-                       return 1;
+                       return MOD_RES_DENY;
                }
-               return 0;
+               return MOD_RES_PASSTHRU;
        }
 
-       virtual int OnCheckBan(User* user, Channel* chan)
+       virtual ModResult OnCheckBan(User* user, Channel* chan)
        {
                if (IS_OPER(user))
                        return chan->GetExtBanStatus(user->oper, 'O');
 
-               return 0;
+               return MOD_RES_PASSTHRU;
        }
 
        virtual ~ModuleOperChans()