From fb667c18bf2d98e41e3c2ac9ea96f53a740d6829 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 22 Sep 2018 19:30:31 +0200 Subject: mod_scansion_record: Record disconnection --- plugins/mod_scansion_record.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/mod_scansion_record.lua b/plugins/mod_scansion_record.lua index 98c30eb6..3fbc8b6b 100644 --- a/plugins/mod_scansion_record.lua +++ b/plugins/mod_scansion_record.lua @@ -87,6 +87,13 @@ module:hook("resource-bind", function (event) filters.add_filter(session, "stanzas/out", record_stanza_out); end); +module:hook("resource-unbind", function (event) + local session = event.session; + if session.scansion_id then + record_event(session, "disconnects"); + end +end) + record_header("# mod_scansion_record on host '"..module.host.."' recording started "..dt.datetime().."\n\n"); record[[ -- cgit v1.2.3