Merge pull request #327 from slingamn/misc3

two service bug fixes
This commit is contained in:
Daniel Oaks 2019-01-10 12:05:50 +10:00 committed by GitHub
commit 16981f2abb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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) {
if client.LoggedIntoAccount() {
nsNotice(rb, client.t("You're already logged into an account"))
return
}
loginSuccessful := false
username := params[0]
@ -308,7 +313,7 @@ func nsRegisterHandler(server *Server, client *Client, command string, params []
// get params
username, email := params[0], params[1]
var passphrase string
if len(params) > 0 {
if len(params) > 2 {
passphrase = params[2]
}