From e70acf4c17b5fa5796bc05f6cea6078f5bab4e36 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Tue, 2 Jun 2020 18:57:28 -0400 Subject: [PATCH] fix #1108 --- irc/accounts.go | 2 +- irc/client.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/irc/accounts.go b/irc/accounts.go index 451eaf62..8540a802 100644 --- a/irc/accounts.go +++ b/irc/accounts.go @@ -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()) } } diff --git a/irc/client.go b/irc/client.go index bbb58f14..599aa9ee 100644 --- a/irc/client.go +++ b/irc/client.go @@ -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) } }