From cd7bd0335273995b9b0f01e2f2426df8ad707845 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 22 Sep 2018 14:38:40 +0200 Subject: mod_scansion_record: Generate a header with hostname and timestamp --- plugins/mod_scansion_record.lua | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'plugins') diff --git a/plugins/mod_scansion_record.lua b/plugins/mod_scansion_record.lua index 6e93aead..ee967271 100644 --- a/plugins/mod_scansion_record.lua +++ b/plugins/mod_scansion_record.lua @@ -6,6 +6,7 @@ local full_jids = {}; local filters = require "util.filters"; local id = require "util.id"; +local dt = require "util.datetime"; local dm = require "util.datamanager"; local record_id = id.medium():lower(); @@ -77,7 +78,15 @@ module:hook("resource-bind", function (event) filters.add_filter(session, "stanzas/out", record_stanza_out); end); +record_header("# mod_scansion_record on host '"..module.host.."' recording started "..dt.datetime().."\n\n"); + +record[[ +----- + +]] + module:hook_global("server-stopping", function () + record("# recording ended on "..dt.datetime().."\n"); module:log("info", "Scansion recording available in %s", record_file); scan:close(); head:close() -- cgit v1.2.3