round wait times to the nearest millisecond

This commit is contained in:
Shivaram Lingamneni 2023-01-08 06:36:04 -05:00
parent 1e6dee15b2
commit f72a6fa011
3 changed files with 5 additions and 4 deletions

View file

@ -811,7 +811,7 @@ func nsGroupHandler(service *ircService, server *Server, client *Client, command
func nsLoginThrottleCheck(service *ircService, client *Client, rb *ResponseBuffer) (success bool) {
throttled, remainingTime := client.checkLoginThrottle()
if throttled {
service.Notice(rb, fmt.Sprintf(client.t("Please wait at least %v and try again"), remainingTime))
service.Notice(rb, fmt.Sprintf(client.t("Please wait at least %v and try again"), remainingTime.Round(time.Millisecond)))
}
return !throttled
}