Merge branch 'master' of github.com:oragono/oragono

This commit is contained in:
Daniel Oaks 2019-01-12 22:18:08 +10:00
commit 85276c5e6d
1 changed files with 6 additions and 1 deletions

View File

@ -238,6 +238,11 @@ func nsLoginThrottleCheck(client *Client, rb *ResponseBuffer) (success bool) {
} }
func nsIdentifyHandler(server *Server, client *Client, command string, params []string, rb *ResponseBuffer) { func nsIdentifyHandler(server *Server, client *Client, command string, params []string, rb *ResponseBuffer) {
if client.LoggedIntoAccount() {
nsNotice(rb, client.t("You're already logged into an account"))
return
}
loginSuccessful := false loginSuccessful := false
username := params[0] username := params[0]
@ -308,7 +313,7 @@ func nsRegisterHandler(server *Server, client *Client, command string, params []
// get params // get params
username, email := params[0], params[1] username, email := params[0], params[1]
var passphrase string var passphrase string
if len(params) > 0 { if len(params) > 2 {
passphrase = params[2] passphrase = params[2]
} }