summaryrefslogtreecommitdiff
path: root/blabouncer.c
diff options
context:
space:
mode:
Diffstat (limited to 'blabouncer.c')
-rw-r--r--blabouncer.c8
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);