Software / code / prosody
Comparison
plugins/mod_register.lua @ 5707:36a289e9244c
mod_register: Fix indentation
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 19 Jun 2013 16:35:19 +0200 |
| parent | 5637:991b47778bf3 |
| child | 5763:0e52f1d5ca71 |
comparison
equal
deleted
inserted
replaced
| 5706:896094da72e4 | 5707:36a289e9244c |
|---|---|
| 70 | 70 |
| 71 module:add_feature("jabber:iq:register"); | 71 module:add_feature("jabber:iq:register"); |
| 72 | 72 |
| 73 local register_stream_feature = st.stanza("register", {xmlns="http://jabber.org/features/iq-register"}):up(); | 73 local register_stream_feature = st.stanza("register", {xmlns="http://jabber.org/features/iq-register"}):up(); |
| 74 module:hook("stream-features", function(event) | 74 module:hook("stream-features", function(event) |
| 75 local session, features = event.origin, event.features; | 75 local session, features = event.origin, event.features; |
| 76 | 76 |
| 77 -- Advertise registration to unauthorized clients only. | 77 -- Advertise registration to unauthorized clients only. |
| 78 if not(allow_registration) or session.type ~= "c2s_unauthed" then | 78 if not(allow_registration) or session.type ~= "c2s_unauthed" then |
| 79 return | 79 return |
| 80 end | 80 end |