From 5a3a07a9e64f4677290062712f9e9a3299061971 Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Thu, 12 Sep 2019 21:55:07 +0100 Subject: Log server messages to file named .log. --- logging.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'logging.h') diff --git a/logging.h b/logging.h index 441a500..6371f8a 100644 --- a/logging.h +++ b/logging.h @@ -36,14 +36,15 @@ #define LOG_PRIVMSG 0 #define LOG_JOINPART 1 #define LOG_TOPIC 2 +#define LOG_NETWORK 3 #define DEBUG_CRIT 0 #define DEBUG_SOME 1 #define DEBUG_FULL 2 // Write the line 'str' to the relevant log file such as -// '#channel.log' or 'nickname.log'. 'ournick' is our own -// nick and is used to determine which log file to write to -// if the type is LOG_PRIVMSG. +// '#channel.log' or 'nickname.log'. 'ircdstate->ircnick' +// is our own nick and is used to determine which log file +// to write to if the type is LOG_PRIVMSG. // 'basedir' is the directory in which the 'logs' directory // will be created in which logs are to be written. // @@ -59,11 +60,14 @@ // // If LOG_TOPIC then it expects a string in the format: // :nick!bar@baz TOPIC #channel :bla bla bla - +// +// If LOG_NETWORK then it just logs the string verbatim in +// a file named 'ircdstate->ircdname'.log. +// // With the ":foo!bar@baz "prefix being important for all // types. // // Returns 1 on success or 0 on failure. -int logline(char *str, char *ournick, char *basedir, int type); +int logline(char *str, struct ircdstate *ircdstate, char *basedir, int type); #endif -- cgit v1.2.3