summaryrefslogtreecommitdiff
path: root/replay.h
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2019-06-11 22:54:50 +0100
committerLuke Bratch <luke@bratch.co.uk>2019-06-11 22:54:50 +0100
commit511e258e901e5248e1706609ba1099507fd750ae (patch)
tree4c7ee92fbe3634e7c78579657a023948a1a6bbae /replay.h
parent9db9fb396aaf601bd00f2b62face2693307a0e16 (diff)
Implement configurable auto replay modes. So far there is "none", "time" (auto replay the last X seconds), and "lastspoke" (auto replay everything since you last spoke).
Diffstat (limited to 'replay.h')
-rw-r--r--replay.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/replay.h b/replay.h
index ee3f483..5ae9994 100644
--- a/replay.h
+++ b/replay.h
@@ -19,6 +19,7 @@
#define REPLAY_H_INCLUDED
#define _XOPEN_SOURCE
+#define _XOPEN_SOURCE_EXTENDED
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -40,6 +41,10 @@ int replaylines(int seconds, char *basedir);
int readreplayline(int seconds, int linenum, char *str, char *basedir);
+// Returns the number of seconds ago that 'nick' last spoke, or -1 if there is a problem.
+// 'basedir' is the directory in which to find 'replay.log'.
+int lastspokesecondsago(char *nick, char *basedir);
+
int writereplayline(char *str, char *basedir);
#endif