From 0557ca58710dd0b10e0476f49e1744e2f79e5fd7 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 10 Jun 2021 12:16:33 +0200 Subject: [PATCH] Don't suggest users to /motd in multi-upstream mode --- downstream.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/downstream.go b/downstream.go index 7d4ab5b..7d4c370 100644 --- a/downstream.go +++ b/downstream.go @@ -1102,7 +1102,9 @@ func (dc *downstreamConn) welcome() error { for _, msg := range generateIsupport(dc.srv.prefix(), dc.nick, isupport) { dc.SendMessage(msg) } + motdHint := "No MOTD" if uc := dc.upstream(); uc != nil { + motdHint = "Use /motd to read the message of the day" dc.SendMessage(&irc.Message{ Prefix: dc.srv.prefix(), Command: irc.RPL_UMODEIS, @@ -1112,7 +1114,7 @@ func (dc *downstreamConn) welcome() error { dc.SendMessage(&irc.Message{ Prefix: dc.srv.prefix(), Command: irc.ERR_NOMOTD, - Params: []string{dc.nick, "Use /motd to read the message of the day"}, + Params: []string{dc.nick, motdHint}, }) dc.updateNick()