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

Merge pull request #1110 from slingamn/chghost.1

fix #1108
This commit is contained in:
Shivaram Lingamneni 2020-06-03 06:44:01 -07:00 committed by GitHub
commit 4044a02dce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -1719,7 +1719,7 @@ func (am *AccountManager) applyVHostInfo(client *Client, info VHostInfo) {
updated := client.SetVHost(vhost)
if updated {
// TODO: doing I/O here is kind of a kludge
go client.sendChghost(oldNickmask, client.Hostname())
client.sendChghost(oldNickmask, client.Hostname())
}
}

View File

@ -1052,9 +1052,9 @@ func (client *Client) SetOper(oper *Oper) {
// XXX: CHGHOST requires prefix nickmask to have original hostname,
// this is annoying to do correctly
func (client *Client) sendChghost(oldNickMask string, vhost string) {
username := client.Username()
details := client.Details()
for fClient := range client.Friends(caps.ChgHost) {
fClient.sendFromClientInternal(false, time.Time{}, "", oldNickMask, client.AccountName(), nil, "CHGHOST", username, vhost)
fClient.sendFromClientInternal(false, time.Time{}, "", oldNickMask, details.accountName, nil, "CHGHOST", details.username, vhost)
}
}