aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/mod_scansion_record.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/mod_scansion_record.lua b/plugins/mod_scansion_record.lua
index e7fa8e70..6e93aead 100644
--- a/plugins/mod_scansion_record.lua
+++ b/plugins/mod_scansion_record.lua
@@ -10,14 +10,20 @@ local dm = require "util.datamanager";
local record_id = id.medium():lower();
local record_date = os.date("%Y%b%d"):lower();
+local header_file = dm.getpath(record_id, "scansion", record_date, "sch", true);
local record_file = dm.getpath(record_id, "scansion", record_date, "scs", true);
+local head = io.open(header_file, "w");
local scan = io.open(record_file, "w");
local function record(string)
scan:write(string);
end
+local function record_header(string)
+ head:write(string);
+end
+
local function record_event(session, event)
record(session.scansion_id.." "..event.."\n\n");
end
@@ -74,4 +80,5 @@ end);
module:hook_global("server-stopping", function ()
module:log("info", "Scansion recording available in %s", record_file);
scan:close();
+ head:close()
end);