summaryrefslogtreecommitdiffstats
path: root/mbbsd/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/cache.c')
-rw-r--r--mbbsd/cache.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/mbbsd/cache.c b/mbbsd/cache.c
index 4933339f..d32d7f15 100644
--- a/mbbsd/cache.c
+++ b/mbbsd/cache.c
@@ -1031,3 +1031,12 @@ hbflcheck(int bid, int uid)
}
return 1;
}
+
+#ifdef USE_COOLDOWN
+void add_cooldowntime(int uid, int min)
+{
+ time4_t new = now + 60 * min;
+ time4_t old = SHM->cooldowntime[uid - 1];
+ SHM->cooldowntime[uid - 1] = new > old ? new : old;
+}
+#endif