3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-23 03:02:48 +01:00

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

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
}