Software /
code /
prosody
Comparison
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 |
comparison
equal
deleted
inserted
replaced
9372:0e685b7ec039 | 9373:1a69803d5d5d |
---|---|
85 | 85 |
86 filters.add_filter(session, "stanzas/in", record_stanza_in); | 86 filters.add_filter(session, "stanzas/in", record_stanza_in); |
87 filters.add_filter(session, "stanzas/out", record_stanza_out); | 87 filters.add_filter(session, "stanzas/out", record_stanza_out); |
88 end); | 88 end); |
89 | 89 |
90 module:hook("resource-unbind", function (event) | |
91 local session = event.session; | |
92 if session.scansion_id then | |
93 record_event(session, "disconnects"); | |
94 end | |
95 end) | |
96 | |
90 record_header("# mod_scansion_record on host '"..module.host.."' recording started "..dt.datetime().."\n\n"); | 97 record_header("# mod_scansion_record on host '"..module.host.."' recording started "..dt.datetime().."\n\n"); |
91 | 98 |
92 record[[ | 99 record[[ |
93 ----- | 100 ----- |
94 | 101 |