From 81e493093198281eb396ec402282381c3e7bc896 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 5 May 2020 16:52:50 +0200 Subject: [PATCH] Add time tag to echo messages Closes: https://todo.sr.ht/~emersion/soju/59 --- downstream.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/downstream.go b/downstream.go index 10a12be..b96f510 100644 --- a/downstream.go +++ b/downstream.go @@ -1361,6 +1361,9 @@ func (dc *downstreamConn) handleMessageRegistered(msg *irc.Message) error { }) echoMsg := &irc.Message{ + Tags: irc.Tags{ + "time": irc.TagValue(time.Now().UTC().Format(serverTimeLayout)), + }, Prefix: &irc.Prefix{ Name: uc.nick, User: uc.username, @@ -1368,7 +1371,6 @@ func (dc *downstreamConn) handleMessageRegistered(msg *irc.Message) error { Command: "PRIVMSG", Params: []string{upstreamName, text}, } - uc.produce(upstreamName, echoMsg, dc) } case "NOTICE":