forked from External/ergo
fix #347
This commit is contained in:
parent
9d56677691
commit
0c33c3399f
2 changed files with 7 additions and 1 deletions
|
|
@ -229,11 +229,13 @@ func registrationErrorToMessageAndCode(err error) (message, code string) {
|
|||
|
||||
// helper function to dispatch messages when a client successfully registers
|
||||
func sendSuccessfulRegResponse(client *Client, rb *ResponseBuffer, forNS bool) {
|
||||
details := client.Details()
|
||||
if forNS {
|
||||
nsNotice(rb, client.t("Account created"))
|
||||
} else {
|
||||
rb.Add(nil, client.server.name, RPL_REG_SUCCESS, client.nick, client.AccountName(), client.t("Account created"))
|
||||
rb.Add(nil, client.server.name, RPL_REG_SUCCESS, details.nick, details.accountName, client.t("Account created"))
|
||||
}
|
||||
client.server.snomasks.Send(sno.LocalAccounts, fmt.Sprintf(ircfmt.Unescape("Client $c[grey][$r%s$c[grey]] registered account $c[grey][$r%s$c[grey]]"), details.nickMask, details.accountName))
|
||||
sendSuccessfulAccountAuth(client, rb, forNS, false)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue