mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
Merge pull request #1761 from delthas/feature-extended-monitor
Add support for extended-monitor
This commit is contained in:
commit
9b6ec04ca5
5 changed files with 36 additions and 5 deletions
|
|
@ -109,7 +109,7 @@ func sendSuccessfulAccountAuth(service *ircService, client *Client, rb *Response
|
|||
|
||||
if client.Registered() {
|
||||
// dispatch account-notify
|
||||
for friend := range client.Friends(caps.AccountNotify) {
|
||||
for friend := range client.FriendsMonitors(caps.AccountNotify) {
|
||||
if friend != rb.session {
|
||||
friend.Send(nil, details.nickMask, "ACCOUNT", details.accountName)
|
||||
}
|
||||
|
|
@ -421,7 +421,7 @@ func dispatchAwayNotify(client *Client, isAway bool, awayMessage string) {
|
|||
// dispatch away-notify
|
||||
details := client.Details()
|
||||
isBot := client.HasMode(modes.Bot)
|
||||
for session := range client.Friends(caps.AwayNotify) {
|
||||
for session := range client.FriendsMonitors(caps.AwayNotify) {
|
||||
if isAway {
|
||||
session.sendFromClientInternal(false, time.Time{}, "", details.nickMask, details.accountName, isBot, nil, "AWAY", awayMessage)
|
||||
} else {
|
||||
|
|
@ -2926,7 +2926,7 @@ func setnameHandler(server *Server, client *Client, msg ircmsg.Message, rb *Resp
|
|||
|
||||
// alert friends
|
||||
now := time.Now().UTC()
|
||||
friends := client.Friends(caps.SetName)
|
||||
friends := client.FriendsMonitors(caps.SetName)
|
||||
delete(friends, rb.session)
|
||||
isBot := client.HasMode(modes.Bot)
|
||||
for session := range friends {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue