Software /
code /
prosody
Changeset
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 |
parents | 2606:c3fe88d4b921 |
children | 2608:68c43aaf681f |
files | plugins/mod_tls.lua |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
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);