mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-10 22:19:31 +01:00
accounts: Disable reg if client's already registered an account
This commit is contained in:
parent
eb72c38d0c
commit
d052ca8a8d
@ -92,6 +92,12 @@ func accRegisterHandler(server *Server, client *Client, msg ircmsg.IrcMessage) b
|
||||
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
|
||||
account := strings.TrimSpace(msg.Params[1])
|
||||
casefoldedAccount, err := CasefoldName(account)
|
||||
|
Loading…
Reference in New Issue
Block a user