|
@ -852,13 +852,16 @@ func (client *Client) handleSendLoop() { |
|
|
func (client *Client) handleEvent(event *Event) { |
|
|
func (client *Client) handleEvent(event *Event) { |
|
|
sentCapEnd := false |
|
|
sentCapEnd := false |
|
|
|
|
|
|
|
|
// IRCv3 `server-time`
|
|
|
|
|
|
|
|
|
// Only use IRCv3 `server-time` to overwrite when requested. Frontends/dependents can still
|
|
|
|
|
|
// get this information.
|
|
|
|
|
|
if client.config.UseServerTime { |
|
|
if timeTag, ok := event.Tags["time"]; ok { |
|
|
if timeTag, ok := event.Tags["time"]; ok { |
|
|
serverTime, err := time.Parse(time.RFC3339Nano, timeTag) |
|
|
serverTime, err := time.Parse(time.RFC3339Nano, timeTag) |
|
|
if err == nil && serverTime.Year() > 2000 { |
|
|
if err == nil && serverTime.Year() > 2000 { |
|
|
event.Time = serverTime |
|
|
event.Time = serverTime |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// For events that were created with targets, handle them now there now.
|
|
|
// For events that were created with targets, handle them now there now.
|
|
|
for _, target := range event.targets { |
|
|
for _, target := range event.targets { |
|
|