nickserv: IDENTIFY reports an unregistered account distinctly
A failed IDENTIFY now says whether the account isn't registered or the password was wrong, instead of one message for both.
This commit is contained in:
parent
914c3874ce
commit
4408281d20
2 changed files with 12 additions and 0 deletions
|
|
@ -50,6 +50,12 @@ impl Service for NickServ {
|
|||
return;
|
||||
}
|
||||
};
|
||||
// Distinguish an unregistered account from a wrong password, so a
|
||||
// failed login says which it was.
|
||||
if !db.exists(account_name) {
|
||||
ctx.notice(me, from.uid, format!("\x02{account_name}\x02 isn't registered."));
|
||||
return;
|
||||
}
|
||||
match db.authenticate(account_name, password) {
|
||||
Some(account) => {
|
||||
// Already identified to this account: don't re-fire the login.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue