mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
parent
258af017d4
commit
623735c757
3 changed files with 5 additions and 5 deletions
|
|
@ -1121,7 +1121,7 @@ func (client *Client) SetOper(oper *Oper) {
|
||||||
func (client *Client) sendChghost(oldNickMask string, vhost string) {
|
func (client *Client) sendChghost(oldNickMask string, vhost string) {
|
||||||
details := client.Details()
|
details := client.Details()
|
||||||
isBot := client.HasMode(modes.Bot)
|
isBot := client.HasMode(modes.Bot)
|
||||||
for fClient := range client.FriendsMonitors(caps.ExtendedMonitor, caps.ChgHost) {
|
for fClient := range client.FriendsMonitors(caps.ChgHost) {
|
||||||
fClient.sendFromClientInternal(false, time.Time{}, "", oldNickMask, details.accountName, isBot, nil, "CHGHOST", details.username, vhost)
|
fClient.sendFromClientInternal(false, time.Time{}, "", oldNickMask, details.accountName, isBot, nil, "CHGHOST", details.username, vhost)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@ func sendSuccessfulAccountAuth(service *ircService, client *Client, rb *Response
|
||||||
|
|
||||||
if client.Registered() {
|
if client.Registered() {
|
||||||
// dispatch account-notify
|
// dispatch account-notify
|
||||||
for friend := range client.FriendsMonitors(caps.ExtendedMonitor, caps.AccountNotify) {
|
for friend := range client.FriendsMonitors(caps.AccountNotify) {
|
||||||
if friend != rb.session {
|
if friend != rb.session {
|
||||||
friend.Send(nil, details.nickMask, "ACCOUNT", details.accountName)
|
friend.Send(nil, details.nickMask, "ACCOUNT", details.accountName)
|
||||||
}
|
}
|
||||||
|
|
@ -531,7 +531,7 @@ func dispatchAwayNotify(client *Client, awayMessage string) {
|
||||||
// dispatch away-notify
|
// dispatch away-notify
|
||||||
details := client.Details()
|
details := client.Details()
|
||||||
isBot := client.HasMode(modes.Bot)
|
isBot := client.HasMode(modes.Bot)
|
||||||
for session := range client.FriendsMonitors(caps.ExtendedMonitor, caps.AwayNotify) {
|
for session := range client.FriendsMonitors(caps.AwayNotify) {
|
||||||
if awayMessage != "" {
|
if awayMessage != "" {
|
||||||
session.sendFromClientInternal(false, time.Time{}, "", details.nickMask, details.accountName, isBot, nil, "AWAY", awayMessage)
|
session.sendFromClientInternal(false, time.Time{}, "", details.nickMask, details.accountName, isBot, nil, "AWAY", awayMessage)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -3650,7 +3650,7 @@ func setnameHandler(server *Server, client *Client, msg ircmsg.Message, rb *Resp
|
||||||
|
|
||||||
// alert friends
|
// alert friends
|
||||||
now := time.Now().UTC()
|
now := time.Now().UTC()
|
||||||
friends := client.FriendsMonitors(caps.ExtendedMonitor, caps.SetName)
|
friends := client.FriendsMonitors(caps.SetName)
|
||||||
delete(friends, rb.session)
|
delete(friends, rb.session)
|
||||||
isBot := client.HasMode(modes.Bot)
|
isBot := client.HasMode(modes.Bot)
|
||||||
for session := range friends {
|
for session := range friends {
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ func (manager *MonitorManager) AddMonitors(users utils.HashSet[*Session], cfnick
|
||||||
manager.RLock()
|
manager.RLock()
|
||||||
defer manager.RUnlock()
|
defer manager.RUnlock()
|
||||||
for session := range manager.watchedby[cfnick] {
|
for session := range manager.watchedby[cfnick] {
|
||||||
if session.capabilities.HasAll(capabs...) {
|
if session.capabilities.Has(caps.ExtendedMonitor) && session.capabilities.HasAll(capabs...) {
|
||||||
users.Add(session)
|
users.Add(session)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue