summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_chanprotect.cpp4
-rw-r--r--src/modules/m_override.cpp3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp
index 86f6876ae..a0a0da1e0 100644
--- a/src/modules/m_chanprotect.cpp
+++ b/src/modules/m_chanprotect.cpp
@@ -209,7 +209,7 @@ class ModuleChanProtect : public Module
return -1;
// given user isnt even on the channel, eat the mode change
- if (!Srv->IsOnChannel(theuser,chan))
+ if (!chan->HasUser(theuser))
return -1;
// source is a server, or ulined, we'll let them +-q the user.
@@ -252,7 +252,7 @@ class ModuleChanProtect : public Module
return -1;
// given user isnt even on the channel, eat the mode change
- if (!Srv->IsOnChannel(theuser,chan))
+ if (!chan->HasUser(theuser))
return -1;
// source has +q, is a server, or ulined, we'll let them +-a the user.
diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp
index df6eb0616..d764f553b 100644
--- a/src/modules/m_override.cpp
+++ b/src/modules/m_override.cpp
@@ -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)
{