registration: Very initial, very skodgy 'working' account reg

This commit is contained in:
Daniel Oaks 2016-09-05 19:43:32 +10:00
parent 4cb196f50a
commit 90d5f7d6a2
1 changed files with 6 additions and 3 deletions

View File

@ -120,6 +120,10 @@ func regCreateHandler(server *Server, client *Client, msg ircmsg.IrcMessage) boo
// account could not be created and relevant numerics have been dispatched, abort
if err != nil {
if err != errAccountCreation {
client.Send(nil, server.nameString, ERR_UNKNOWNERROR, client.nickString, "REG", "CREATE", "Could not register")
log.Println("Could not save registration initial data:", err.Error())
}
return false
}
@ -221,14 +225,13 @@ func regCreateHandler(server *Server, client *Client, msg ircmsg.IrcMessage) boo
}
// automatically complete registration
if callbackNamespace != "*" {
if callbackNamespace == "*" {
client.Notice("Account creation was successful!")
removeFailedRegCreateData(server.store, accountString)
return false
}
// dispatch callback
client.Notice(fmt.Sprintf("We should dispatch an actual callback here to %s:%s", callbackNamespace, callbackValue))
client.Notice(fmt.Sprintf("We should dispatch a real callback here to %s:%s", callbackNamespace, callbackValue))
return false
}