summaryrefslogtreecommitdiff
path: root/src/helperfuncs.cpp
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2017-07-27 13:13:16 +0100
committerGitHub <noreply@github.com>2017-07-27 13:13:16 +0100
commitff3b706b2506d7614bce5e54bc88657bd62ebd4d (patch)
treedbfbe3df3df3668f0e1ac531229b4e15ff240754 /src/helperfuncs.cpp
parentbb4aa10ed82612624da45d0c9592ddf7f2f51ab5 (diff)
parent81027f3a0888ac4c8e3fb6ea90081492defce946 (diff)
Merge pull request #1271 from SaberUK/master+exemption
Move the OnCheckExemption hook out of the core.
Diffstat (limited to 'src/helperfuncs.cpp')
-rw-r--r--src/helperfuncs.cpp25
1 files changed, 0 insertions, 25 deletions
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;
-}