From df234b842e8c8a4ea4ddc3f6bc6185bc2118dccf Mon Sep 17 00:00:00 2001 From: Pratyush Desai Date: Fri, 5 Aug 2022 19:39:54 +0530 Subject: [PATCH] uban list explicitly shows indefinite durations --- irc/handlers.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/irc/handlers.go b/irc/handlers.go index 41b69c57..d618ea68 100644 --- a/irc/handlers.go +++ b/irc/handlers.go @@ -897,10 +897,7 @@ func formatBanForListing(client *Client, key string, info IPBanInfo) string { if info.OperReason != "" && info.OperReason != info.Reason { desc = fmt.Sprintf("%s | %s", info.Reason, info.OperReason) } - if info.Duration != 0 { - desc = fmt.Sprintf("%s [%s]", desc, info.TimeLeft()) - } - desc = fmt.Sprintf("%s added on [%s]", desc, info.TimeCreated.UTC().Format(time.RFC1123)) + desc = fmt.Sprintf("%s [%s] added on [%s]", desc, info.TimeLeft(), info.TimeCreated.UTC().Format(time.RFC1123)) banType := "Ban" if info.RequireSASL { banType = "SASL required"