From f767fc29fb0c192d20308a09aaa18918ac8a0875 Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Sun, 19 May 2019 18:37:27 +0100 Subject: Enable logging of TOPIC changes. --- blabouncer.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'blabouncer.c') diff --git a/blabouncer.c b/blabouncer.c index 4173914..859d3af 100644 --- a/blabouncer.c +++ b/blabouncer.c @@ -2,7 +2,6 @@ // - Perhaps rename clients.ssl and server_ssl since they may not even be OpenSSL sockets // - Is it possible to replay JOINs/PARTs? // - Move debug output into some debug function -// - Log TOPICs // "server" means the real IRC server // "client" means bouncer clients @@ -35,6 +34,7 @@ #define EXCEPT_NONE 0 #define LOG_PRIVMSG 0 #define LOG_JOINPART 1 +#define LOG_TOPIC 2 // It seems to be that *message length* is max 512 bytes, but a socket read from at least UnrealIRCd seems to be up to at least 2416 (+1 for null) bytes. // 1208 bytes with OpenSSL, 2416 bytes with plain text. @@ -801,6 +801,12 @@ int processircmessage(SSL *server_ssl, char *str, int source, struct client *cli // And then finally relay to all clients sendtoallclients(clients, str, sourcefd, settings); + + // Write to normal log if logging enabled + if (settings->logging) { + logline(str, settings->ircnick, settings->basedir, LOG_TOPIC); + } + free(topiccopy); free(prefixcopy); free(strcopyPtr); -- cgit v1.2.3