forked from External/ergo
accounts: Disable reg if client's already registered an account
This commit is contained in:
parent
eb72c38d0c
commit
d052ca8a8d
1 changed files with 6 additions and 0 deletions
|
|
@ -92,6 +92,12 @@ func accRegisterHandler(server *Server, client *Client, msg ircmsg.IrcMessage) b
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// clients can't reg new accounts if they're already logged in
|
||||||
|
if client.account != nil {
|
||||||
|
client.Send(nil, server.name, ERR_REG_UNSPECIFIED_ERROR, client.nick, "*", "You're already logged into an account")
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
// get and sanitise account name
|
// get and sanitise account name
|
||||||
account := strings.TrimSpace(msg.Params[1])
|
account := strings.TrimSpace(msg.Params[1])
|
||||||
casefoldedAccount, err := CasefoldName(account)
|
casefoldedAccount, err := CasefoldName(account)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue