]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_override.cpp
Improved strhashcomp with no allocations
[user/henk/code/inspircd.git] / src / modules / m_override.cpp
index df6eb0616b74404f62aac327e6a3edb25c2684e0..d764f553bb5a4da520c29441fdeaaad6a6ebc75e 100644 (file)
@@ -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)
                                        {