summaryrefslogtreecommitdiff
path: root/logging.h
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 /logging.h
parent55b6f72223675c226238a5110d674a852e9922d3 (diff)
Log server messages to file named <ircdname>.log.
Diffstat (limited to 'logging.h')
-rw-r--r--logging.h14
1 files changed, 9 insertions, 5 deletions
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