3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-14 07:59:31 +01:00
This commit is contained in:
vegax87 2017-02-09 12:23:10 +01:00
commit b3a54cbb2c

View File

@ -551,10 +551,11 @@ var (
func (client *Client) Send(tags *map[string]ircmsg.TagValue, prefix string, command string, params ...string) error { func (client *Client) Send(tags *map[string]ircmsg.TagValue, prefix string, command string, params ...string) error {
// attach server-time // attach server-time
if client.capabilities[ServerTime] { if client.capabilities[ServerTime] {
t := time.Now().UTC().Format("2006-01-02T15:04:05.999Z")
if tags == nil { if tags == nil {
tags = ircmsg.MakeTags("time", time.Now().Format("2006-01-02T15:04:05.999Z")) tags = ircmsg.MakeTags("time", t)
} else { } else {
(*tags)["time"] = ircmsg.MakeTagValue(time.Now().Format("2006-01-02T15:04:05.999Z")) (*tags)["time"] = ircmsg.MakeTagValue(t)
} }
} }