summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-04-05 23:46:51 +0200
committerdefault <nobody@localhost>2023-04-05 23:46:51 +0200
commit1fe34ffb4a5b844bd32fd9146173366f09a32351 (patch)
treed7155bcb20b83b93a78adc570b1e154c81a2e5f6 /data.c
parent7c00a9918a961b46c555d67b4c6d729f34e36cac (diff)
New function lastlog_write().
Diffstat (limited to 'data.c')
-rw-r--r--data.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/data.c b/data.c
index f9acfa0..de2f25b 100644
--- a/data.c
+++ b/data.c
@@ -1366,6 +1366,19 @@ d_char *history_list(snac *snac)
}
+void lastlog_write(snac *snac)
+/* writes the last time and date the user logged in */
+{
+ xs *fn = xs_fmt("%s/lastlog.txt", snac->basedir);
+ FILE *f;
+
+ if ((f = fopen(fn, "w")) != NULL) {
+ fprintf(f, "%lf\n", ftime());
+ fclose(f);
+ }
+}
+
+
/** inbox collection **/
void inbox_add(const char *inbox)