From ca04e0ba5de0f1fc6c93326373e33d0e1587df56 Mon Sep 17 00:00:00 2001 From: vague666 Date: Mon, 9 Mar 2020 14:15:40 +0100 Subject: [PATCH] -time was missing in /ignore output and made it human-readable --- src/fe-common/core/fe-ignore.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/fe-common/core/fe-ignore.c b/src/fe-common/core/fe-ignore.c index 54ab6a55..e34055bc 100644 --- a/src/fe-common/core/fe-ignore.c +++ b/src/fe-common/core/fe-ignore.c @@ -19,6 +19,7 @@ */ #include "module.h" +#include #include #include #include @@ -48,6 +49,8 @@ static void ignore_print(int index, IGNORE_REC *rec) { GString *options; char *key, *levels; + struct tm ts; + char buf[20]; key = ignore_get_key(rec); levels = bits2level(rec->level); @@ -67,6 +70,11 @@ static void ignore_print(int index, IGNORE_REC *rec) g_string_append_printf(options, "-network %s ", rec->servertag); if (rec->pattern != NULL) g_string_append_printf(options, "-pattern %s ", rec->pattern); + if (rec->unignore_time != NULL) { + ts = *localtime(&rec->unignore_time); + strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", &ts); + g_string_append_printf(options, "ignore ends: %s ", buf); + } if (options->len > 1) g_string_truncate(options, options->len-1);