summaryrefslogtreecommitdiff
path: root/blabouncer.c
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2019-09-12 21:55:07 +0100
committerLuke Bratch <luke@bratch.co.uk>2019-09-12 21:55:07 +0100
commit5a3a07a9e64f4677290062712f9e9a3299061971 (patch)
tree7ed9bd9b46ba1207025331269b2263ea06b04ea4 /blabouncer.c
parent55b6f72223675c226238a5110d674a852e9922d3 (diff)
Log server messages to file named <ircdname>.log.
Diffstat (limited to 'blabouncer.c')
-rw-r--r--blabouncer.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/blabouncer.c b/blabouncer.c
index 7052117..d94a165 100644
--- a/blabouncer.c
+++ b/blabouncer.c
@@ -235,7 +235,13 @@ int processircmessage(SSL *server_ssl, char *str, int source, struct client *cli
// =============================================>
- debugprint(DEBUG_FULL, "Done with processircmessage(), didn't process anything.\n");
+ debugprint(DEBUG_FULL, "Done with processircmessage(), didn't process anything, logging to network log.\n");
+
+
+ // Write to normal log if logging enabled
+ if (settings->logging) {
+ logline(str, ircdstate, settings->basedir, LOG_NETWORK);
+ }
// If we got here then we didn't process anything
free(strcopyPtr);
@@ -338,6 +344,7 @@ int processrawstring(SSL *server_ssl, char *str, int source, struct client *clie
for (int i = 0; i < messagecount; i++) {
if (messages[i][0] != '\0') {
debugprint(DEBUG_FULL, "Message %d (\"%s\") remains unprocessed...\n", i, messages[i]);
+
switch(source) {
case SOURCE_SERVER: // If message(s) were from the real IRC server
// Relay/send to all clients ("except" = 0 because this should send to all clients)