From ea26056beaadc3da508bee2cee967b50f58c8e17 Mon Sep 17 00:00:00 2001 From: Egor Date: Thu, 25 Jan 2024 04:29:54 +0200 Subject: [PATCH] move server logging to sendbuf --- src/irc.c | 1 + src/net.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/irc.c b/src/irc.c index 25ba04e..6801c3c 100644 --- a/src/irc.c +++ b/src/irc.c @@ -10,6 +10,7 @@ map_t autojoin = {0}; const char *hostname = IRCDHOSTNAME; void sendbuf(struct client_data *client) { + fprintf(stderr, "SERVER %"PRISocket": %.*s", client->FD, (int)databuf.len, (char*)databuf.buf); sendClient(client, databuf.buf, databuf.len); } void chanlog_time(time_t timestamp) { diff --git a/src/net.c b/src/net.c index 1556060..7d471d9 100644 --- a/src/net.c +++ b/src/net.c @@ -215,7 +215,6 @@ static int sendClientRaw(struct client_data *cl, const char *buf, size_t len) cl->want_write_for_write = 0; if (cl->FD == (SOCKET)INVALID_SOCKET) return 0; - fprintf(stderr, "SERVER %"PRISocket": %.*s", cl->FD, (int)len, (char*)buf); #ifdef HAS_TLS if (cl->cctx) { while (len) { -- 2.56.0