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)
|
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) {
|
if uc.monitored.Has(target) {
|
||||||
cmd := irc.RPL_MONOFFLINE
|
cmd := irc.RPL_MONOFFLINE
|
||||||
if online := uc.monitored.Value(target); online {
|
if online := uc.monitored.Value(target); online {
|
||||||
@ -2632,6 +2642,10 @@ func (dc *downstreamConn) handleMessageRegistered(ctx context.Context, msg *irc.
|
|||||||
cmd = irc.RPL_MONONLINE
|
cmd = irc.RPL_MONONLINE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if uc.network.casemap(target) == serviceNickCM {
|
||||||
|
cmd = irc.RPL_MONONLINE
|
||||||
|
}
|
||||||
|
|
||||||
dc.SendMessage(&irc.Message{
|
dc.SendMessage(&irc.Message{
|
||||||
Prefix: dc.srv.prefix(),
|
Prefix: dc.srv.prefix(),
|
||||||
Command: cmd,
|
Command: cmd,
|
||||||
|
@ -2135,6 +2135,9 @@ func (uc *upstreamConn) updateMonitor() {
|
|||||||
uc.forEachDownstream(func(dc *downstreamConn) {
|
uc.forEachDownstream(func(dc *downstreamConn) {
|
||||||
for _, entry := range dc.monitored.innerMap {
|
for _, entry := range dc.monitored.innerMap {
|
||||||
targetCM := uc.network.casemap(entry.originalKey)
|
targetCM := uc.network.casemap(entry.originalKey)
|
||||||
|
if targetCM == serviceNickCM {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if !uc.monitored.Has(targetCM) {
|
if !uc.monitored.Has(targetCM) {
|
||||||
if _, ok := add[targetCM]; !ok {
|
if _, ok := add[targetCM]; !ok {
|
||||||
addList = append(addList, targetCM)
|
addList = append(addList, targetCM)
|
||||||
|
Loading…
Reference in New Issue
Block a user