From d689d7eadefbad1c8f20edc9e25cceaf549c5a2c Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 6 Apr 2005 13:15:05 +0000 Subject: Fix by om for 'mode change while not on channel' bug git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@988 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_override.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/modules') diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp index cd9cfba0f..a84571217 100644 --- a/src/modules/m_override.cpp +++ b/src/modules/m_override.cpp @@ -64,7 +64,9 @@ class ModuleOverride : public Module { if ((Srv) && (source) && (channel)) { - if ((Srv->ChanMode(source,channel) != "%") && (Srv->ChanMode(source,channel) != "@")) + // 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) != "@"))) { switch (access_type) { -- cgit v1.2.3