Software /
code /
prosody
Diff
plugins/mod_tls.lua @ 2607:35a5d1c5ea28
mod_tls: Hook stream-features event using new events API.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Fri, 12 Feb 2010 03:50:44 +0500 |
parent | 2605:ade70495fe7f |
child | 2613:afa20941e098 |
line wrap: on
line diff
--- a/plugins/mod_tls.lua Fri Feb 12 03:49:05 2010 +0500 +++ b/plugins/mod_tls.lua Fri Feb 12 03:50:44 2010 +0500 @@ -42,8 +42,9 @@ end); -- Advertize stream feature -module:add_event_hook("stream-features", function(session, features) - if not session.username and session.conn.starttls then +module:hook("stream-features", function(event) + local origin, features = event.origin, event.features; + if not origin.username and origin.conn.starttls then features:add_child(c2s_feature); end end);