3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-22 18:52:41 +01:00
This commit is contained in:
Shivaram Lingamneni 2020-06-02 18:57:28 -04:00
parent a45e15b520
commit e70acf4c17
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) updated := client.SetVHost(vhost)
if updated { if updated {
// TODO: doing I/O here is kind of a kludge // 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, // XXX: CHGHOST requires prefix nickmask to have original hostname,
// this is annoying to do correctly // this is annoying to do correctly
func (client *Client) sendChghost(oldNickMask string, vhost string) { func (client *Client) sendChghost(oldNickMask string, vhost string) {
username := client.Username() details := client.Details()
for fClient := range client.Friends(caps.ChgHost) { 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)
} }
} }