Add time tag to echo messages
Closes: https://todo.sr.ht/~emersion/soju/59
This commit is contained in:
parent
f79cf305ab
commit
81e4930931
@ -1361,6 +1361,9 @@ func (dc *downstreamConn) handleMessageRegistered(msg *irc.Message) error {
|
|||||||
})
|
})
|
||||||
|
|
||||||
echoMsg := &irc.Message{
|
echoMsg := &irc.Message{
|
||||||
|
Tags: irc.Tags{
|
||||||
|
"time": irc.TagValue(time.Now().UTC().Format(serverTimeLayout)),
|
||||||
|
},
|
||||||
Prefix: &irc.Prefix{
|
Prefix: &irc.Prefix{
|
||||||
Name: uc.nick,
|
Name: uc.nick,
|
||||||
User: uc.username,
|
User: uc.username,
|
||||||
@ -1368,7 +1371,6 @@ func (dc *downstreamConn) handleMessageRegistered(msg *irc.Message) error {
|
|||||||
Command: "PRIVMSG",
|
Command: "PRIVMSG",
|
||||||
Params: []string{upstreamName, text},
|
Params: []string{upstreamName, text},
|
||||||
}
|
}
|
||||||
|
|
||||||
uc.produce(upstreamName, echoMsg, dc)
|
uc.produce(upstreamName, echoMsg, dc)
|
||||||
}
|
}
|
||||||
case "NOTICE":
|
case "NOTICE":
|
||||||
|
Loading…
Reference in New Issue
Block a user