3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-26 22:09:24 +01:00

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

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]
}