~emersion/soju-dev

Forward MOTD messages downstream v1 SUPERSEDED

Gregory Anders: 1
 Forward MOTD messages downstream

 1 files changed, 7 insertions(+), 1 deletions(-)
Ah, and for bonus points: maybe it would be nice to change our default
ERR_NOMOTD message to read something like "Run /motd to obtain the
message of the day".
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~emersion/soju-dev/patches/23228/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH] Forward MOTD messages downstream Export this patch

---
 upstream.go | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/upstream.go b/upstream.go
index c812ef1..9031a94 100644
--- a/upstream.go
+++ b/upstream.go
@@ -662,6 +662,10 @@ func (uc *upstreamConn) handleMessage(msg *irc.Message) error {
			uc.network.updateCasemapping(casemapRFC1459)
			uc.nickCM = uc.network.casemap(uc.nick)
		}

		uc.forEachDownstreamByID(downstreamID, func(dc *downstreamConn) {
			dc.SendMessage(msg)
		})
	case "BATCH":
		var tag string
		if err := parseMessageParams(msg, &tag); err != nil {
@@ -1421,7 +1425,9 @@ func (uc *upstreamConn) handleMessage(msg *irc.Message) error {
	case irc.RPL_LUSERCLIENT, irc.RPL_LUSEROP, irc.RPL_LUSERUNKNOWN, irc.RPL_LUSERCHANNELS, irc.RPL_LUSERME:
		// Ignore
	case irc.RPL_MOTDSTART, irc.RPL_MOTD:
		// Ignore
		uc.forEachDownstreamByID(downstreamID, func(dc *downstreamConn) {
			dc.SendMessage(msg)
		})
	case irc.RPL_LISTSTART:
		// Ignore
	case rpl_localusers, rpl_globalusers:
-- 
2.32.0
I think we should forward RPL_ENDOFMOTD and ERR_NOMOTD as well?