Software /
code /
prosody
Diff
plugins/mod_scansion_record.lua @ 9373:1a69803d5d5d
mod_scansion_record: Record disconnection
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 22 Sep 2018 19:30:31 +0200 |
parent | 9372:0e685b7ec039 |
child | 9618:d6e6e1fb7ef0 |
line wrap: on
line diff
--- a/plugins/mod_scansion_record.lua Sat Sep 22 19:29:27 2018 +0200 +++ b/plugins/mod_scansion_record.lua Sat Sep 22 19:30:31 2018 +0200 @@ -87,6 +87,13 @@ 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[[