X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_override.cpp;h=d931891c2e67a1ad86e578e6224da831cdd303fe;hb=de69e28a4a1aea89e410b693bbbb67890ecb0bd3;hp=8a3fcdd62faa6509fa411edf8df949abcacee717;hpb=ff3eef491aa9e107d09d9dd9560ef7715b37b3b3;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp index 8a3fcdd62..d931891c2 100644 --- a/src/modules/m_override.cpp +++ b/src/modules/m_override.cpp @@ -61,7 +61,7 @@ class ModuleOverride : public Module bool CanOverride(User* source, const char* token) { // checks to see if the oper's type has - override_t::iterator j = overrides.find(source->oper); + override_t::iterator j = overrides.find(source->oper->name); if (j != overrides.end()) { @@ -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") {