1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 09:16:38 +02:00

Allow unidentified users to use sendpass and resetpasss if configured properly

This commit is contained in:
Adam
2010-08-28 13:58:23 -04:00
parent 4cc6604326
commit 26ba944d55
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -20,13 +20,14 @@ class CommandNSResetPass : public Command
public:
CommandNSResetPass() : Command("RESETPASS", 1, 1)
{
this->SetFlag(CFLAG_ALLOW_UNREGISTERED);
}
CommandReturn Execute(User *u, const std::vector<Anope::string> &params)
{
NickAlias *na;
if (Config->RestrictMail && !u->Account()->HasCommand("nickserv/resetpass"))
if (Config->RestrictMail && (!u->Account() || !u->Account()->HasCommand("nickserv/resetpass")))
notice_lang(Config->s_NickServ, u, ACCESS_DENIED);
if (!(na = findnick(params[0])))
notice_lang(Config->s_NickServ, u, NICK_X_NOT_REGISTERED, params[0].c_str());