1
0
mirror of https://github.com/anope/anope.git synced 2026-06-28 03:56:38 +02:00

Move some of CheckKick to the respective modules

This commit is contained in:
Adam
2012-12-28 15:59:33 -05:00
parent 761849083d
commit 6b1f323bb5
6 changed files with 83 additions and 70 deletions
+7 -1
View File
@@ -29,7 +29,7 @@ class CommandNSResetPass : public Command
{
const NickAlias *na;
if (Config->RestrictMail && source.HasCommand("nickserv/resetpass"))
if (Config->RestrictMail && !source.HasCommand("nickserv/resetpass"))
source.Reply(ACCESS_DENIED);
else if (!(na = NickAlias::Find(params[0])))
source.Reply(NICK_X_NOT_REGISTERED, params[0].c_str());
@@ -78,6 +78,12 @@ class NSResetPass : public Module
ModuleManager::Attach(I_OnPreCommand, this);
}
~NSResetPass()
{
for (nickcore_map::const_iterator it = NickCoreList->begin(), it_end = NickCoreList->end(); it != it_end; ++it)
it->second->Shrink("ns_resetpass");
}
EventReturn OnPreCommand(CommandSource &source, Command *command, std::vector<Anope::string> &params) anope_override
{
if (command->name == "nickserv/confirm" && params.size() > 1)