From d4bbf6294528b8a536d352de1ce1e4184a6ef90d Mon Sep 17 00:00:00 2001 From: Not Date: Sat, 19 Nov 2022 16:47:23 +0100 Subject: [PATCH] add download command --- lb_store.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lb_store.lua b/lb_store.lua index 488a297..9de7551 100644 --- a/lb_store.lua +++ b/lb_store.lua @@ -381,6 +381,18 @@ COM_AddCommand("lb_known_maps", function(player, map) end end) +COM_AddCommand("lb_download_live_records", function(player, filename) + if not filename then + CONS_Printf(player, "Usage: lb_download_live_records ") + return + end + + if filename:sub(#filename-3) != ".txt" then + filename = $..".txt" + end + dumpStoreToFile(filename, LiveStore) +end, COM_LOCAL) + -- Load the livestore if isserver then LiveStore = loadStoreFile(LEADERBOARD_FILE)