]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_override.cpp
AMD64 warning 'fix' which tested fine when I added it seems to now...stop things...
[user/henk/code/inspircd.git] / src / modules / m_override.cpp
index df6eb0616b74404f62aac327e6a3edb25c2684e0..f92bb9899b8970209e747ec715fa07bd3953946e 100644 (file)
@@ -49,7 +49,7 @@ class ModuleOverride : public Module
                OnRehash("");
        }
        
-       virtual void OnRehash(std::string parameter)
+       virtual void OnRehash(const std::string &parameter)
        {
                // on a rehash we delete our classes for good measure and create them again.
                delete Conf;
@@ -88,7 +88,7 @@ class ModuleOverride : public Module
                return false;
        }
 
-       virtual int OnUserPreKick(userrec* source, userrec* user, chanrec* chan, std::string reason)
+       virtual int OnUserPreKick(userrec* source, userrec* user, chanrec* chan, const std::string &reason)
        {
                if ((*source->oper) && (CanOverride(source,"KICK")))
                {
@@ -110,7 +110,8 @@ class ModuleOverride : public Module
                        {
                                // Fix by brain - allow the change if they arent on channel - rely on boolean short-circuit
                                // to not check the other items in the statement if they arent on the channel
-                               if ((!Srv->IsOnChannel(source,channel)) || ((Srv->ChanMode(source,channel) != "%") && (Srv->ChanMode(source,channel) != "@")))
+                               std::string mode = Srv->ChanMode(source,channel);
+                               if ((!channel->HasUser(source)) || ((mode != "%") && (mode != "@")))
                                {
                                        switch (access_type)
                                        {
@@ -184,7 +185,7 @@ class ModuleOverride : public Module
                {
                        if (chan)
                        {
-                               if ((chan->binarymodes & CM_INVITEONLY) && (CanOverride(user,"INVITE")))
+                               if ((chan->modes[CM_INVITEONLY]) && (CanOverride(user,"INVITE")))
                                {
                                        if (NoisyOverride)
                                        {