summaryrefslogtreecommitdiff
path: root/modules/commands/ns_resetpass.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-12-28 15:59:33 -0500
committerAdam <Adam@anope.org>2012-12-28 15:59:33 -0500
commit6b1f323bb519009048a94c8bb3d003288a339345 (patch)
treeb30ad2793adca8e63f9de0b8a45295a4f3d56dea /modules/commands/ns_resetpass.cpp
parent761849083da3a523eeb3b2293311cfee1c29df35 (diff)
Move some of CheckKick to the respective modules
Diffstat (limited to 'modules/commands/ns_resetpass.cpp')
-rw-r--r--modules/commands/ns_resetpass.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/commands/ns_resetpass.cpp b/modules/commands/ns_resetpass.cpp
index 39eead56e..fb4fb4ae9 100644
--- a/modules/commands/ns_resetpass.cpp
+++ b/modules/commands/ns_resetpass.cpp
@@ -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)