From 5b76f94df8d19f4b4998dba650583ec6acac05f7 Mon Sep 17 00:00:00 2001 From: Michael Ortmann Date: Sun, 19 Nov 2023 14:42:11 +0100 Subject: [PATCH 1/6] Initial patch by jackal --- src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 6ac8ec908..8f6233e10 100644 --- a/src/main.c +++ b/src/main.c @@ -1136,8 +1136,8 @@ 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)); + putlog(LOG_MISC, "*", "=== %s: %d channel%s, %d user%s.", + botnetnick, i, (i == 1) ? "" : "s", count_users(userlist), (count_users(userlist) == 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"); From 7fc43cb3fc8b0e4bca33b9564aade5a6c96aa3a0 Mon Sep 17 00:00:00 2001 From: Michael Ortmann Date: Sun, 19 Nov 2023 14:46:10 +0100 Subject: [PATCH 2/6] Cleanup --- src/main.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main.c b/src/main.c index 8f6233e10..9b757909e 100644 --- a/src/main.c +++ b/src/main.c @@ -1136,12 +1136,13 @@ int main(int arg_c, char **arg_v) i = 0; for (chan = chanset; chan; chan = chan->next) i++; - putlog(LOG_MISC, "*", "=== %s: %d channel%s, %d user%s.", - botnetnick, i, (i == 1) ? "" : "s", count_users(userlist), (count_users(userlist) == 1) ? "" : "s"); + putlog(LOG_MISC, "*", "=== %s: %d channel%s, %d user%s.", botnetnick, i, + (i == 1) ? "" : "s", count_users(userlist), + (count_users(userlist) == 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"); - printf(" without Chewie\n"); + printf("\n" + "NOTE: The -n flag is no longer used, it is as effective as Han\n" + " without Chewie\n"); } #ifdef TLS ssl_init(); From 6dbce8c1390aa4a34feb93520a9545c27cec8def Mon Sep 17 00:00:00 2001 From: Michael Ortmann Date: Sun, 19 Nov 2023 18:39:50 +0100 Subject: [PATCH 3/6] Enhance code style --- src/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.c b/src/main.c index 9b757909e..a2f3d673a 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,9 +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 channel%s, %d user%s.", botnetnick, i, - (i == 1) ? "" : "s", count_users(userlist), - (count_users(userlist) == 1) ? "" : "s"); + 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" "NOTE: The -n flag is no longer used, it is as effective as Han\n" From 7a5a0cf10daf684a6b005543ae92640ee09366d9 Mon Sep 17 00:00:00 2001 From: Michael Ortmann Date: Sun, 19 Nov 2023 18:52:44 +0100 Subject: [PATCH 4/6] Again --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index a2f3d673a..f011cd5c5 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, j, xx; + int i, j, xx; char s[25]; FILE *f; struct sigaction sv; From 89b66c32183e88e108d12fde1d8db4e443460cc4 Mon Sep 17 00:00:00 2001 From: Geo Date: Sat, 30 Dec 2023 20:06:12 -0500 Subject: [PATCH 5/6] Update main.c --- src/main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main.c b/src/main.c index f011cd5c5..7ffbfd9d4 100644 --- a/src/main.c +++ b/src/main.c @@ -1140,10 +1140,9 @@ int main(int arg_c, char **arg_v) 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" - "NOTE: The -n flag is no longer used, it is as effective as Han\n" - " without Chewie\n"); - } + printf("\n"); + printf("NOTE: The -n flag is no longer used, it is as effective as Han\n"); + printf(" without Chewie\n"); #ifdef TLS ssl_init(); #endif From 5af5dcf379f48803154b50eafa0bef72b6231bda Mon Sep 17 00:00:00 2001 From: Geo Date: Sat, 30 Dec 2023 20:06:58 -0500 Subject: [PATCH 6/6] Update main.c --- src/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.c b/src/main.c index 7ffbfd9d4..c03177b89 100644 --- a/src/main.c +++ b/src/main.c @@ -1143,6 +1143,7 @@ int main(int arg_c, char **arg_v) printf("\n"); printf("NOTE: The -n flag is no longer used, it is as effective as Han\n"); printf(" without Chewie\n"); + } #ifdef TLS ssl_init(); #endif