summaryrefslogtreecommitdiff
path: root/blabouncer.c
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2019-05-16 00:15:47 +0100
committerLuke Bratch <luke@bratch.co.uk>2019-05-16 00:15:47 +0100
commita299b62e913df71bdd1c4b41d61d3fb098f12be7 (patch)
tree4e3061c884ef8636a94a773de30893bbff84cd52 /blabouncer.c
parent0cebf7c6d557d0b76d069af908a2a47366033fde (diff)
Implement normal logging (file per channel/user).
Diffstat (limited to 'blabouncer.c')
-rw-r--r--blabouncer.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/blabouncer.c b/blabouncer.c
index 2bf2138..3f9004d 100644
--- a/blabouncer.c
+++ b/blabouncer.c
@@ -5,7 +5,6 @@
// - Might need to change channel struct nicks to be channel struct user struct with its own nick/modes/etc.
// - Do we actually need to store the modes in the channel struct?
// - Get CAP from server and relay to client
-// - Add blabouncer MOTD (375, 372, 376)
// - "01:53:47 -!- ServerMode/#test [b] by irc.tghost.co.uk" on existing clients when new client connects
// - Keep track of changing user nicks/modes
// - Should replay log do more than PRIVMSGs?
@@ -14,7 +13,7 @@
// - Configurable auto channels
// - Comma separated channel list in JOINs/PARTs
// - Only send some things to the requesting client (e.g. LIST replies)
-// - Normal (non-replay) log
+// - Customise logging (disabling it, log file location)
// - Alert when clients connect/authenticate/disconnect
// - Perhaps rename arr_ssl and server_ssl since they may not even be OpenSSL sockets
//
@@ -44,6 +43,7 @@
#include "sockets.h"
#include "config.h"
#include "replay.h"
+#include "logging.h"
#define SOURCE_SERVER 0
#define SOURCE_CLIENT 1
@@ -688,6 +688,9 @@ int processircmessage(SSL *server_ssl, int *clientsockfd, char *str, int source,
// Write to replay log
writereplayline(str);
+ // Write to normal log
+ logprivmsg(str, settings->ircnick);
+
return 1;
}
}
@@ -872,6 +875,9 @@ int processircmessage(SSL *server_ssl, int *clientsockfd, char *str, int source,
// Write to replay log
writereplayline(outgoingmsg);
+ // Write to normal log
+ logprivmsg(outgoingmsg, settings->ircnick);
+
return 1;
}