From ef9ab1fd141f4057d41f2d6ed8ab8d67c44894d5 Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Thu, 9 Jan 2025 16:32:55 -0800 Subject: save state --- src/include/protocol.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/include/protocol.h') diff --git a/src/include/protocol.h b/src/include/protocol.h index 204a507..31138c2 100644 --- a/src/include/protocol.h +++ b/src/include/protocol.h @@ -2,6 +2,7 @@ #define PROTOCOL_H #include +#include #include #include "array.h" @@ -38,7 +39,7 @@ typedef struct { } message_t; typedef struct { - array_t *messages; + FILE *messages; user_t *admin; array_t *mods; @@ -58,9 +59,14 @@ typedef struct { user_t *user1; user_t *user2; - array_t *messages; + struct tm *date; + FILE *msgs; } dm_t; +string_t *date_str(); + +bool same_day(struct tm *date1, struct tm *date2); + string_t *encode_chanstate(ht_t *chans); string_t *encode_usersstate(ht_t *u); -- cgit