|
@@ -84,6 +84,12 @@ func removeFailedRegCreateData(store *buntdb.DB, account string) {
|
84
|
84
|
|
85
|
85
|
// regCreateHandler parses the REG CREATE command.
|
86
|
86
|
func regCreateHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
|
|
87
|
+ // make sure reg is enabled
|
|
88
|
+ if !server.accountRegistration.Enabled {
|
|
89
|
+ client.Send(nil, server.name, ERR_REG_UNSPECIFIED_ERROR, client.nick, "*", "Account registration is disabled")
|
|
90
|
+ return false
|
|
91
|
+ }
|
|
92
|
+
|
87
|
93
|
// get and sanitise account name
|
88
|
94
|
account := strings.TrimSpace(msg.Params[1])
|
89
|
95
|
casefoldedAccount, err := CasefoldName(account)
|