From fb50d70b70e5f93699390e73d4d3d554de49fcb6 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 23 Jun 2021 11:45:14 +0200 Subject: [PATCH] Forward LUSERS and STATS messages after initial registration --- upstream.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/upstream.go b/upstream.go index 76d6599..6c46814 100644 --- a/upstream.go +++ b/upstream.go @@ -1455,8 +1455,14 @@ func (uc *upstreamConn) handleMessage(msg *irc.Message) error { case irc.RPL_YOURHOST, irc.RPL_CREATED: // Ignore 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: + // 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 { return nil } @@ -1470,10 +1476,6 @@ func (uc *upstreamConn) handleMessage(msg *irc.Message) error { }) case irc.RPL_LISTSTART: // Ignore - case rpl_localusers, rpl_globalusers: - // Ignore - case irc.RPL_STATSVLINE, rpl_statsping, irc.RPL_STATSBLINE, irc.RPL_STATSDLINE: - // Ignore case "ERROR": var text string if err := parseMessageParams(msg, &text); err != nil {