X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fhelperfuncs.cpp;h=8bb81481ef6807d3e22ada43f290c9db434388a4;hb=97b5e92c3d1195c4e3b3dc8dea3183c06399414e;hp=c9135679cfd0e8d6a31d4aeab4b484d1ee0685dd;hpb=c6a508a3da977041909f18f77d6e8fea942512cf;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index c9135679c..8bb81481e 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -430,28 +430,3 @@ void GenRandomHandler::Call(char *output, size_t max) output[i] = random(); #endif } - -ModResult OnCheckExemptionHandler::Call(User* user, Channel* chan, const std::string& restriction) -{ - unsigned int mypfx = chan->GetPrefixValue(user); - char minmode = 0; - std::string current; - - irc::spacesepstream defaultstream(ServerInstance->Config->ConfValue("options")->getString("exemptchanops")); - - while (defaultstream.GetToken(current)) - { - std::string::size_type pos = current.find(':'); - if (pos == std::string::npos) - continue; - if (!current.compare(0, pos, restriction)) - minmode = current[pos+1]; - } - - PrefixMode* mh = ServerInstance->Modes->FindPrefixMode(minmode); - if (mh && mypfx >= mh->GetPrefixRank()) - return MOD_RES_ALLOW; - if (mh || minmode == '*') - return MOD_RES_DENY; - return MOD_RES_PASSTHRU; -}