summaryrefslogtreecommitdiff
path: root/blabouncer.c
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2019-05-19 20:07:52 +0100
committerLuke Bratch <luke@bratch.co.uk>2019-05-19 20:07:52 +0100
commit4873bf3a636cebb05bb2b40cdd987a62c373fe5a (patch)
treee919fd35ff201c5feaf08387b48fb6eb43d6cf5b /blabouncer.c
parentb2688dd9435060460bd8f63f2a6da4828d9a88ac (diff)
Send JOINs/PARTs to clients before the logging functions manipulate the line.
Diffstat (limited to 'blabouncer.c')
-rw-r--r--blabouncer.c10
1 files changed, 6 insertions, 4 deletions
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;