From c80ce9eceb6412225bfa3a62bc557b17147119f7 Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Mon, 10 Jun 2019 22:21:29 +0100 Subject: Use debugprint() instead of printf() if the server times out. --- blabouncer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blabouncer.c b/blabouncer.c index bf27835..d14223e 100644 --- a/blabouncer.c +++ b/blabouncer.c @@ -452,7 +452,7 @@ void dochat(int *serversockfd, int *clientsockfd, struct settings *settings) { // Before we wait for a message, let's make sure the server is still responding // TODO - Code duplication, make a function and share with socket error code below if (ircdstrings.lastmessagetime < time(NULL) - SERVERTIMEOUT) { - printf("Server has timed out (%ld seconds), reconnecting!\n", time(NULL) - ircdstrings.lastmessagetime); + debugprint(DEBUG_CRIT, "Server has timed out (%ld seconds), reconnecting!\n", time(NULL) - ircdstrings.lastmessagetime); // Tell all clients if we timed out char alertmsg[MAXDATASIZE]; snprintf(alertmsg, MAXDATASIZE, "NOTICE %s :Server has timed out (%ld seconds), reconnecting!", ircdstrings.ircnick, time(NULL) - ircdstrings.lastmessagetime); -- cgit v1.2.3