summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--blabouncer.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/blabouncer.c b/blabouncer.c
index 859d3af..0e9fda8 100644
--- a/blabouncer.c
+++ b/blabouncer.c
@@ -1,6 +1,5 @@
// TODO:
// - 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
// "server" means the real IRC server
@@ -665,6 +664,11 @@ int processircmessage(SSL *server_ssl, char *str, int source, struct client *cli
createchannel(channels, tokens[2], "TOPIC", "TOPICWHO", "0");
}
+ // Write to replay log if replay logging enabled
+ if (settings->replaylogging) {
+ writereplayline(str, settings->basedir);
+ }
+
// Write to normal log if logging enabled
if (settings->logging) {
logline(str, settings->ircnick, settings->basedir, LOG_JOINPART);
@@ -690,6 +694,11 @@ int processircmessage(SSL *server_ssl, char *str, int source, struct client *cli
removechannel(channels, tokens[2]);
}
+ // Write to replay log if replay logging enabled
+ if (settings->replaylogging) {
+ writereplayline(str, settings->basedir);
+ }
+
// Write to normal log if logging enabled
if (settings->logging) {
logline(str, settings->ircnick, settings->basedir, LOG_JOINPART);
@@ -802,6 +811,11 @@ 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 replay log if replay logging enabled
+ if (settings->replaylogging) {
+ writereplayline(str, settings->basedir);
+ }
+
// Write to normal log if logging enabled
if (settings->logging) {
logline(str, settings->ircnick, settings->basedir, LOG_TOPIC);