diff options
author | Luke Bratch <luke@bratch.co.uk> | 2019-05-19 18:37:27 +0100 |
---|---|---|
committer | Luke Bratch <luke@bratch.co.uk> | 2019-05-19 18:37:27 +0100 |
commit | f767fc29fb0c192d20308a09aaa18918ac8a0875 (patch) | |
tree | 0d207d9dfe0c6474bb2f707342a6fe10500144c6 /blabouncer.c | |
parent | a5880d645c2bbf8dfae6daabb1d3c3c66e3c310b (diff) |
Enable logging of TOPIC changes.
Diffstat (limited to 'blabouncer.c')
-rw-r--r-- | blabouncer.c | 8 |
1 files changed, 7 insertions, 1 deletions
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); |