X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_override.cpp;h=ea9d11c94e0662e367b1659e7f0e881060c325bc;hb=551d687ec6d7ce44be35fae0dd7345fe73c4f63a;hp=62fdfc8c907954240fab76af2c55f5d8b3ae3ef5;hpb=1cb05553e286227e6bbd463d0b4b8cae40ff3940;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp index 62fdfc8c9..ea9d11c94 100644 --- a/src/modules/m_override.cpp +++ b/src/modules/m_override.cpp @@ -52,9 +52,9 @@ class ModuleOverride : public Module RequireKey = tag->getBool("requirekey"); } - void On005Numeric(std::string &output) + void On005Numeric(std::map& tokens) { - output.append(" OVERRIDE"); + tokens["OVERRIDE"]; } bool CanOverride(User* source, const char* token) @@ -68,7 +68,7 @@ class ModuleOverride : public Module ModResult OnPreTopicChange(User *source, Channel *channel, const std::string &topic) { - if (IS_LOCAL(source) && IS_OPER(source) && CanOverride(source, "TOPIC")) + if (IS_LOCAL(source) && source->IsOper() && CanOverride(source, "TOPIC")) { if (!channel->HasUser(source) || (channel->IsModeSet('t') && channel->GetPrefixValue(source) < HALFOP_VALUE)) { @@ -84,7 +84,7 @@ class ModuleOverride : public Module ModResult OnUserPreKick(User* source, Membership* memb, const std::string &reason) { - if (IS_OPER(source) && CanOverride(source,"KICK")) + if (source->IsOper() && CanOverride(source,"KICK")) { // If the kicker's status is less than the target's, or the kicker's status is less than or equal to voice if ((memb->chan->GetPrefixValue(source) < memb->getRank()) || (memb->chan->GetPrefixValue(source) <= VOICE_VALUE)) @@ -100,7 +100,7 @@ class ModuleOverride : public Module { if (!source || !channel) return MOD_RES_PASSTHRU; - if (!IS_OPER(source) || !IS_LOCAL(source)) + if (!source->IsOper() || !IS_LOCAL(source)) return MOD_RES_PASSTHRU; unsigned int mode = channel->GetPrefixValue(source); @@ -118,7 +118,7 @@ class ModuleOverride : public Module ModResult OnUserPreJoin(User* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven) { - if (IS_LOCAL(user) && IS_OPER(user)) + if (IS_LOCAL(user) && user->IsOper()) { if (chan) {