mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
nickserv: implement GHOST, GROUP, DROP, and INFO
This commit is contained in:
parent
b211fd35da
commit
a022befffe
6 changed files with 308 additions and 84 deletions
|
|
@ -352,15 +352,8 @@ func authPlainHandler(server *Server, client *Client, mechanism string, value []
|
|||
return false
|
||||
}
|
||||
|
||||
// keep it the same as in the REG CREATE stage
|
||||
accountKey, err := CasefoldName(accountKey)
|
||||
if err != nil {
|
||||
rb.Add(nil, server.name, ERR_SASLFAIL, client.nick, client.t("SASL authentication failed: Bad account name"))
|
||||
return false
|
||||
}
|
||||
|
||||
password := string(splitValue[2])
|
||||
err = server.accounts.AuthenticateByPassphrase(client, accountKey, password)
|
||||
err := server.accounts.AuthenticateByPassphrase(client, accountKey, password)
|
||||
if err != nil {
|
||||
msg := authErrorToMessage(server, err)
|
||||
rb.Add(nil, server.name, ERR_SASLFAIL, client.nick, fmt.Sprintf("%s: %s", client.t("SASL authentication failed"), client.t(msg)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue