Skip to content

Commit 2b78721

Browse files
committed
Prevent resetting the password of suspended accounts.
Closes #351.
1 parent 8e3be20 commit 2b78721

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: modules/commands/ns_resetpass.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ class CommandNSResetPass : public Command
2929

3030
if (!(na = NickAlias::Find(params[0])))
3131
source.Reply(NICK_X_NOT_REGISTERED, params[0].c_str());
32+
else if (na->nc->HasExt("NS_SUSPENDED"))
33+
source.Reply(NICK_X_SUSPENDED, na->nc->display.c_str());
3234
else if (!na->nc->email.equals_ci(params[1]))
3335
source.Reply(_("Incorrect email address."));
3436
else
@@ -89,6 +91,12 @@ class NSResetPass : public Module
8991
if (na && ri)
9092
{
9193
NickCore *nc = na->nc;
94+
if (nc->HasExt("NS_SUSPENDED"))
95+
{
96+
source.Reply(NICK_X_SUSPENDED, nc->display.c_str());
97+
return EVENT_STOP;
98+
}
99+
92100
const Anope::string &passcode = params[1];
93101
if (ri->time < Anope::CurTime - 3600)
94102
{

0 commit comments

Comments
 (0)