From 4873bf3a636cebb05bb2b40cdd987a62c373fe5a Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Sun, 19 May 2019 20:07:52 +0100 Subject: Send JOINs/PARTs to clients before the logging functions manipulate the line. --- blabouncer.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'blabouncer.c') diff --git a/blabouncer.c b/blabouncer.c index 45b8648..ec972bc 100644 --- a/blabouncer.c +++ b/blabouncer.c @@ -664,6 +664,9 @@ int processircmessage(SSL *server_ssl, char *str, int source, struct client *cli createchannel(channels, tokens[2], "TOPIC", "TOPICWHO", "0"); } + // And then send to all clients + sendtoallclients(clients, str, sourcefd, settings); + // Write to replay log if replay logging enabled if (settings->replaylogging) { writereplayline(str, settings->basedir); @@ -674,8 +677,6 @@ int processircmessage(SSL *server_ssl, char *str, int source, struct client *cli logline(str, settings->ircnick, settings->basedir, LOG_JOINPART); } - // And then send to all clients - sendtoallclients(clients, str, sourcefd, settings); free(prefixcopy); free(strcopyPtr); return 1; @@ -694,6 +695,9 @@ int processircmessage(SSL *server_ssl, char *str, int source, struct client *cli removechannel(channels, tokens[2]); } + // And then send to all clients + sendtoallclients(clients, str, sourcefd, settings); + // Write to replay log if replay logging enabled if (settings->replaylogging) { writereplayline(str, settings->basedir); @@ -704,8 +708,6 @@ int processircmessage(SSL *server_ssl, char *str, int source, struct client *cli logline(str, settings->ircnick, settings->basedir, LOG_JOINPART); } - // And then send to all clients - sendtoallclients(clients, str, sourcefd, settings); free(prefixcopy); free(strcopyPtr); return 1; -- cgit v1.2.3