summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-06 13:15:05 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-06 13:15:05 +0000
commitd689d7eadefbad1c8f20edc9e25cceaf549c5a2c (patch)
treec7663705b1c61a05e5fb243f85ba379b5410c187 /src/modules
parenta02cf48addf0daf0f3d68b7aeb7df2d478079e45 (diff)
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
Diffstat (limited to 'src/modules')
-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)
{