summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2023-04-08 22:03:50 +0200
committerLuke Bratch <luke@bratch.co.uk>2023-04-08 22:03:50 +0200
commit8bc135137b4543d411a61f9d06f24186a4172761 (patch)
tree4c07fcacaf6471d8349596384d81e31e1debc853
parentca8c31cdb180bd5758a4a4f9d868eca31197081c (diff)
Add/correct description for writereplayline().
-rw-r--r--replay.c2
-rw-r--r--replay.h7
2 files changed, 8 insertions, 1 deletions
diff --git a/replay.c b/replay.c
index b90431c..cda8fb3 100644
--- a/replay.c
+++ b/replay.c
@@ -631,7 +631,7 @@ int doreplaylastspoke(int sourcefd, long linenumber, struct client *clients, str
// 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.
+// Returns the number of bytes written on success, or 0 on failure.
int writereplayline(char *str, char *basedir) {
// Ensure "str" isn't too long
if (strlen(str) >= MAXCHAR) {
diff --git a/replay.h b/replay.h
index d2d2c6d..de0f3de 100644
--- a/replay.h
+++ b/replay.h
@@ -58,6 +58,13 @@ int doreplaytime(int sourcefd, int replayseconds, struct client *clients, struct
// Returns 1 for success or 0 for failure.
int doreplaylastspoke(int sourcefd, long linenumber, struct client *clients, struct settings *settings, struct ircdstate *ircdstate, struct channel *channels);
+// Write the line 'str' to the replay log file after prepending it with
+// the current unixtime timestamp. 'basedir' is the directory in which
+// to write to 'replay.log'.
+// Expects a string in the format:
+// :from!bar@baz PRIVMSG to :hello world
+// With the ":foo!bar@baz "prefix being important.
+// Returns the number of bytes written on success, or 0 on failure.
int writereplayline(char *str, char *basedir);
#endif