mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-22 19:12:05 -08:00
Fix #1883 Nickserv gives error when user attempt to change password to *
This commit is contained in:
parent
24ad24562e
commit
b929691470
1 changed files with 9 additions and 1 deletions
|
|
@ -1146,6 +1146,7 @@ func nsConfirmPassword(server *Server, account, passphrase string) (errorMessage
|
||||||
func nsPasswdHandler(service *ircService, server *Server, client *Client, command string, params []string, rb *ResponseBuffer) {
|
func nsPasswdHandler(service *ircService, server *Server, client *Client, command string, params []string, rb *ResponseBuffer) {
|
||||||
var target string
|
var target string
|
||||||
var newPassword string
|
var newPassword string
|
||||||
|
var checkPassword string
|
||||||
var errorMessage string
|
var errorMessage string
|
||||||
|
|
||||||
var oper *Oper
|
var oper *Oper
|
||||||
|
|
@ -1170,9 +1171,16 @@ func nsPasswdHandler(service *ircService, server *Server, client *Client, comman
|
||||||
if newPassword == "*" {
|
if newPassword == "*" {
|
||||||
newPassword = ""
|
newPassword = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// fix #1883 Nickserv gives error when user attempt to change password to *
|
||||||
|
checkPassword = params[2]
|
||||||
|
if checkPassword == "*" {
|
||||||
|
checkPassword = ""
|
||||||
|
}
|
||||||
|
|
||||||
if target == "" {
|
if target == "" {
|
||||||
errorMessage = `You're not logged into an account`
|
errorMessage = `You're not logged into an account`
|
||||||
} else if newPassword != params[2] {
|
} else if newPassword != checkPassword {
|
||||||
errorMessage = `Passwords do not match`
|
errorMessage = `Passwords do not match`
|
||||||
} else {
|
} else {
|
||||||
if !nsLoginThrottleCheck(service, client, rb) {
|
if !nsLoginThrottleCheck(service, client, rb) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue