From 22eace0fbe01fc54a3ae5b9877138683e2a45f19 Mon Sep 17 00:00:00 2001 From: Michael Ortmann <41313082+michaelortmann@users.noreply.github.com> Date: Sun, 31 Dec 2023 02:10:17 +0100 Subject: [PATCH] Add grammar to channel status Found by: jackal Patch by: jackal Fix log output for channel ("1 channels" -> "1 channel") --- src/main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main.c b/src/main.c index 1527406bb..6d221a7f8 100644 --- a/src/main.c +++ b/src/main.c @@ -1001,7 +1001,7 @@ static void init_random(void) { int main(int arg_c, char **arg_v) { - int i, xx; + int i, j, xx; char s[25]; FILE *f; struct sigaction sv; @@ -1136,8 +1136,9 @@ int main(int arg_c, char **arg_v) i = 0; for (chan = chanset; chan; chan = chan->next) i++; - putlog(LOG_MISC, "*", "=== %s: %d channels, %d users.", - botnetnick, i, count_users(userlist)); + j = count_users(userlist); + putlog(LOG_MISC, "*", "=== %s: %d channel%s, %d user%s.", + botnetnick, i, (i == 1) ? "" : "s", j, (j == 1) ? "" : "s"); if ((cliflags & CLI_N) && (cliflags & CLI_T)) { printf("\n"); printf("NOTE: The -n flag is no longer used, it is as effective as Han\n");