diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_banredirect.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_override.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_redirect.cpp | 4 |
3 files changed, 9 insertions, 5 deletions
diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp index 5965811c4..ffb263ff7 100644 --- a/src/modules/m_banredirect.cpp +++ b/src/modules/m_banredirect.cpp @@ -295,8 +295,12 @@ class ModuleBanRedirect : public Module { /* tell them they're banned and are being transferred */ Channel* destchan = ServerInstance->FindChan(redir->targetchan); + std::string destlimit; - if(destchan && ServerInstance->Modules->Find("m_redirect.so") && destchan->IsModeSet('L') && destchan->limit && (destchan->GetUserCounter() >= destchan->limit)) + if (destchan) + destlimit = destchan->GetModeParameter('l'); + + if(destchan && ServerInstance->Modules->Find("m_redirect.so") && destchan->IsModeSet('L') && !destlimit.empty() && (destchan->GetUserCounter() >= atoi(destlimit.c_str()))) { user->WriteNumeric(474, "%s %s :Cannot join channel (You are banned)", user->nick.c_str(), chan->name.c_str()); return 1; diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp index 15cf2ae55..dc9e9ab37 100644 --- a/src/modules/m_override.cpp +++ b/src/modules/m_override.cpp @@ -253,7 +253,7 @@ class ModuleOverride : public Module return -1; } - if ((!chan->key.empty()) && (CanOverride(user,"KEY")) && keygiven != chan->key) + if ((chan->modes[CM_KEY]) && (CanOverride(user,"KEY")) && keygiven != chan->GetModeParameter('k')) { if (RequireKey && keygiven != "override") { @@ -268,7 +268,7 @@ class ModuleOverride : public Module return -1; } - if ((chan->limit > 0) && (chan->GetUserCounter() >= chan->limit) && (CanOverride(user,"LIMIT"))) + if ((chan->modes[CM_LIMIT]) && (chan->GetUserCounter() >= atoi(chan->GetModeParameter('l').c_str())) && (CanOverride(user,"LIMIT"))) { if (RequireKey && keygiven != "override") { diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp index 8b088af8e..c81ab2a70 100644 --- a/src/modules/m_redirect.cpp +++ b/src/modules/m_redirect.cpp @@ -116,9 +116,9 @@ class ModuleRedirect : public Module { if (chan) { - if (chan->IsModeSet('L') && chan->limit) + if (chan->IsModeSet('L') && chan->modes[CM_LIMIT]) { - if (chan->GetUserCounter() >= chan->limit) + if (chan->GetUserCounter() >= atoi(chan->GetModeParameter('l').c_str())) { std::string channel = chan->GetModeParameter('L'); |