From df37ab42f454e3a96d59a2a86eb76bcb4af0818a Mon Sep 17 00:00:00 2001 From: danieldg Date: Sun, 15 Nov 2009 18:26:25 +0000 Subject: Hide channel mode structures git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12132 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_knock.cpp | 2 +- src/modules/m_override.cpp | 6 +++--- src/modules/m_redirect.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_knock.cpp b/src/modules/m_knock.cpp index 3e794547e..04b843c86 100644 --- a/src/modules/m_knock.cpp +++ b/src/modules/m_knock.cpp @@ -49,7 +49,7 @@ class CommandKnock : public Command return CMD_FAILURE; } - if (!c->modes[CM_INVITEONLY]) + if (!c->IsModeSet('i')) { user->WriteNumeric(480, "%s :Can't KNOCK on %s, channel is not invite only so knocking is pointless!",user->nick.c_str(), c->name.c_str()); return CMD_FAILURE; diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp index cf18495b5..d931891c2 100644 --- a/src/modules/m_override.cpp +++ b/src/modules/m_override.cpp @@ -132,7 +132,7 @@ class ModuleOverride : public Module { if (chan) { - if ((chan->modes[CM_INVITEONLY]) && (CanOverride(user,"INVITE"))) + if (chan->IsModeSet('i') && (CanOverride(user,"INVITE"))) { irc::string x(chan->name.c_str()); if (!IS_LOCAL(user)->IsInvited(x)) @@ -151,7 +151,7 @@ class ModuleOverride : public Module return MOD_RES_ALLOW; } - if ((chan->modes[CM_KEY]) && (CanOverride(user,"KEY")) && keygiven != chan->GetModeParameter('k')) + if (chan->IsModeSet('k') && (CanOverride(user,"KEY")) && keygiven != chan->GetModeParameter('k')) { if (RequireKey && keygiven != "override") { @@ -166,7 +166,7 @@ class ModuleOverride : public Module return MOD_RES_ALLOW; } - if ((chan->modes[CM_LIMIT]) && (chan->GetUserCounter() >= atoi(chan->GetModeParameter('l').c_str())) && (CanOverride(user,"LIMIT"))) + if (chan->IsModeSet('l') && (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 50d2e929f..ff7fb6ac4 100644 --- a/src/modules/m_redirect.cpp +++ b/src/modules/m_redirect.cpp @@ -96,7 +96,7 @@ class ModuleRedirect : public Module { if (chan) { - if (chan->IsModeSet('L') && chan->modes[CM_LIMIT]) + if (chan->IsModeSet('L') && chan->IsModeSet('l')) { if (chan->GetUserCounter() >= atoi(chan->GetModeParameter('l').c_str())) { -- cgit v1.2.3