mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-22 11:59:40 +01:00
accountreg: Fix crash
This commit is contained in:
parent
9a94121281
commit
ff3a864aa3
@ -84,6 +84,12 @@ func removeFailedRegCreateData(store *buntdb.DB, account string) {
|
||||
|
||||
// regCreateHandler parses the REG CREATE command.
|
||||
func regCreateHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
|
||||
// make sure reg is enabled
|
||||
if !server.accountRegistration.Enabled {
|
||||
client.Send(nil, server.name, ERR_REG_UNSPECIFIED_ERROR, client.nick, "*", "Account registration is disabled")
|
||||
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