summaryrefslogtreecommitdiff
path: root/src/modules/m_override.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_override.cpp')
-rw-r--r--src/modules/m_override.cpp4
1 files changed, 3 insertions, 1 deletions
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)
{