Software /
code /
prosody
Diff
plugins/mod_component.lua @ 3616:95ae7af2c82b
mod_component: Rearranged the code a little.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Fri, 12 Nov 2010 23:32:51 +0500 |
parent | 3615:c72d24c2d97b |
child | 3617:26c9ba8f309c |
line wrap: on
line diff
--- a/plugins/mod_component.lua Fri Nov 12 22:39:37 2010 +0500 +++ b/plugins/mod_component.lua Fri Nov 12 23:32:51 2010 +0500 @@ -83,7 +83,6 @@ return true; end - -- Authenticated now log("info", "Component authenticated: %s", session.host); @@ -95,14 +94,12 @@ main_session = session; session.on_destroy = on_destroy; log("info", "Component successfully registered"); + session.send(st.stanza("handshake")); else log("error", "Multiple components bound to the same address, first one wins (TODO: Implement stanza distribution)"); session:close{ condition = "conflict", text = "Component already connected" }; - return true; end - -- Signal successful authentication - session.send(st.stanza("handshake")); return true; end