diff options
author | Luke Bratch <luke@bratch.co.uk> | 2019-06-11 22:54:50 +0100 |
---|---|---|
committer | Luke Bratch <luke@bratch.co.uk> | 2019-06-11 22:54:50 +0100 |
commit | 511e258e901e5248e1706609ba1099507fd750ae (patch) | |
tree | 4c7ee92fbe3634e7c78579657a023948a1a6bbae /replay.h | |
parent | 9db9fb396aaf601bd00f2b62face2693307a0e16 (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.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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 |