3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-27 21:22:37 +01:00

Merge pull request #1255 from slingamn/issue1254

fix #1254
This commit is contained in:
Shivaram Lingamneni 2020-09-01 00:24:12 -07:00 committed by GitHub
commit 812414189b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -785,7 +785,7 @@ func (channel *Channel) Join(client *Client, key string, isSajoin bool, rb *Resp
session.Send(nil, client.server.name, "MODE", chname, modestr, details.nick)
}
if isAway && session.capabilities.Has(caps.AwayNotify) {
session.sendFromClientInternal(false, time.Time{}, "", details.nickMask, details.account, nil, "AWAY", awayMessage)
session.sendFromClientInternal(false, time.Time{}, "", details.nickMask, details.accountName, nil, "AWAY", awayMessage)
}
}
}

View File

@ -348,9 +348,9 @@ func dispatchAwayNotify(client *Client, isAway bool, awayMessage string) {
details := client.Details()
for session := range client.Friends(caps.AwayNotify) {
if isAway {
session.sendFromClientInternal(false, time.Time{}, "", details.nickMask, details.account, nil, "AWAY", awayMessage)
session.sendFromClientInternal(false, time.Time{}, "", details.nickMask, details.accountName, nil, "AWAY", awayMessage)
} else {
session.sendFromClientInternal(false, time.Time{}, "", details.nickMask, details.account, nil, "AWAY")
session.sendFromClientInternal(false, time.Time{}, "", details.nickMask, details.accountName, nil, "AWAY")
}
}
}
@ -2568,7 +2568,7 @@ func setnameHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *R
// alert friends
now := time.Now().UTC()
for session := range client.Friends(caps.SetName) {
session.sendFromClientInternal(false, now, "", details.nickMask, details.account, nil, "SETNAME", details.realname)
session.sendFromClientInternal(false, now, "", details.nickMask, details.accountName, nil, "SETNAME", details.realname)
}
return false