Forward LUSERS and STATS messages after initial registration
This commit is contained in:
parent
faa89333bf
commit
fb50d70b70
12
upstream.go
12
upstream.go
@ -1455,8 +1455,14 @@ func (uc *upstreamConn) handleMessage(msg *irc.Message) error {
|
|||||||
case irc.RPL_YOURHOST, irc.RPL_CREATED:
|
case irc.RPL_YOURHOST, irc.RPL_CREATED:
|
||||||
// Ignore
|
// Ignore
|
||||||
case irc.RPL_LUSERCLIENT, irc.RPL_LUSEROP, irc.RPL_LUSERUNKNOWN, irc.RPL_LUSERCHANNELS, irc.RPL_LUSERME:
|
case irc.RPL_LUSERCLIENT, irc.RPL_LUSEROP, irc.RPL_LUSERUNKNOWN, irc.RPL_LUSERCHANNELS, irc.RPL_LUSERME:
|
||||||
// Ignore
|
fallthrough
|
||||||
|
case irc.RPL_STATSVLINE, rpl_statsping, irc.RPL_STATSBLINE, irc.RPL_STATSDLINE:
|
||||||
|
fallthrough
|
||||||
|
case rpl_localusers, rpl_globalusers:
|
||||||
|
fallthrough
|
||||||
case irc.RPL_MOTDSTART, irc.RPL_MOTD:
|
case irc.RPL_MOTDSTART, irc.RPL_MOTD:
|
||||||
|
// Ignore these messages if they're part of the initial registration
|
||||||
|
// message burst. Forward them if the user explicitly asked for them.
|
||||||
if !uc.gotMotd {
|
if !uc.gotMotd {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -1470,10 +1476,6 @@ func (uc *upstreamConn) handleMessage(msg *irc.Message) error {
|
|||||||
})
|
})
|
||||||
case irc.RPL_LISTSTART:
|
case irc.RPL_LISTSTART:
|
||||||
// Ignore
|
// Ignore
|
||||||
case rpl_localusers, rpl_globalusers:
|
|
||||||
// Ignore
|
|
||||||
case irc.RPL_STATSVLINE, rpl_statsping, irc.RPL_STATSBLINE, irc.RPL_STATSDLINE:
|
|
||||||
// Ignore
|
|
||||||
case "ERROR":
|
case "ERROR":
|
||||||
var text string
|
var text string
|
||||||
if err := parseMessageParams(msg, &text); err != nil {
|
if err := parseMessageParams(msg, &text); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user