From 511e258e901e5248e1706609ba1099507fd750ae Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Tue, 11 Jun 2019 22:54:50 +0100 Subject: 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). --- replay.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'replay.h') 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 #include #include @@ -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 -- cgit v1.2.3