summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-20 14:30:00 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-20 14:30:00 +0000
commit4c286655e1b930908fd02681ac00e172156e737c (patch)
treedfac0de69baae4555c4f5df708600f16fe0fb2fc /src/modules
parent93d7a1311d3b22fa9446eda9f7f379f6c0f97956 (diff)
Remove custom members for +lk storage
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10053 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_banredirect.cpp6
-rw-r--r--src/modules/m_override.cpp4
-rw-r--r--src/modules/m_redirect.cpp4
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');