Mark BouncerServ as online in MONITOR, don't forward to upstream
This commit is contained in:
parent
d8f5f8481f
commit
fdf9727600
@ -2587,6 +2587,16 @@ func (dc *downstreamConn) handleMessageRegistered(ctx context.Context, msg *irc.
|
||||
|
||||
dc.monitored.SetValue(target, nil)
|
||||
|
||||
if uc.network.casemap(target) == serviceNickCM {
|
||||
// BouncerServ is never tired
|
||||
dc.SendMessage(&irc.Message{
|
||||
Prefix: dc.srv.prefix(),
|
||||
Command: irc.RPL_MONONLINE,
|
||||
Params: []string{dc.nick, target},
|
||||
})
|
||||
continue
|
||||
}
|
||||
|
||||
if uc.monitored.Has(target) {
|
||||
cmd := irc.RPL_MONOFFLINE
|
||||
if online := uc.monitored.Value(target); online {
|
||||
@ -2632,6 +2642,10 @@ func (dc *downstreamConn) handleMessageRegistered(ctx context.Context, msg *irc.
|
||||
cmd = irc.RPL_MONONLINE
|
||||
}
|
||||
|
||||
if uc.network.casemap(target) == serviceNickCM {
|
||||
cmd = irc.RPL_MONONLINE
|
||||
}
|
||||
|
||||
dc.SendMessage(&irc.Message{
|
||||
Prefix: dc.srv.prefix(),
|
||||
Command: cmd,
|
||||
|
@ -2135,6 +2135,9 @@ func (uc *upstreamConn) updateMonitor() {
|
||||
uc.forEachDownstream(func(dc *downstreamConn) {
|
||||
for _, entry := range dc.monitored.innerMap {
|
||||
targetCM := uc.network.casemap(entry.originalKey)
|
||||
if targetCM == serviceNickCM {
|
||||
continue
|
||||
}
|
||||
if !uc.monitored.Has(targetCM) {
|
||||
if _, ok := add[targetCM]; !ok {
|
||||
addList = append(addList, targetCM)
|
||||
|
Loading…
Reference in New Issue
Block a user