summaryrefslogtreecommitdiff
path: root/logging.h
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2019-05-16 20:59:51 +0100
committerLuke Bratch <luke@bratch.co.uk>2019-05-16 20:59:51 +0100
commit968cee422ab1d61b4234127892d75f0497d8d8c2 (patch)
tree16b65ca2c52ec553cb7584d2259f5d3c11ec5902 /logging.h
parenta299b62e913df71bdd1c4b41d61d3fb098f12be7 (diff)
Add a configurable base directory for things like logs, defaulting to $HOME/.blabouncer/.
Diffstat (limited to 'logging.h')
-rw-r--r--logging.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/logging.h b/logging.h
index 289f348..726bb4d 100644
--- a/logging.h
+++ b/logging.h
@@ -4,6 +4,8 @@
#include <stdio.h>
#include <string.h>
#include <time.h>
+#include <limits.h>
+#include <sys/stat.h>
#include "functions.h"
@@ -17,10 +19,12 @@
// 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.
+// 'basedir' is the directory in which the 'logs' directory
+// will be created in which logs are to be written.
// Expects a string in the format:
// :from!bar@baz PRIVMSG to :hello world
// With the ":foo!bar@baz "prefix being important.
// Returns 1 on success or 0 on failure.
-int logprivmsg(char *str, char *ournick);
+int logprivmsg(char *str, char *ournick, char *basedir);
#endif