aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_component.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-11-12 23:32:51 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-11-12 23:32:51 +0500
commit6bc1c5d24a9ac302b07f54bf1f3588ffcee595d2 (patch)
tree797c1425bd4331e04ee7a757c5c4a3cd8c6384de /plugins/mod_component.lua
parent42993c2ec2569d3d6e54597ea019775926765628 (diff)
downloadprosody-6bc1c5d24a9ac302b07f54bf1f3588ffcee595d2.tar.gz
prosody-6bc1c5d24a9ac302b07f54bf1f3588ffcee595d2.zip
mod_component: Rearranged the code a little.
Diffstat (limited to 'plugins/mod_component.lua')
-rw-r--r--plugins/mod_component.lua5
1 files changed, 1 insertions, 4 deletions
diff --git a/plugins/mod_component.lua b/plugins/mod_component.lua
index 808735b7..b2c571d3 100644
--- a/plugins/mod_component.lua
+++ b/plugins/mod_component.lua
@@ -83,7 +83,6 @@ function handle_component_auth(event)
return true;
end
-
-- Authenticated now
log("info", "Component authenticated: %s", session.host);
@@ -95,14 +94,12 @@ function handle_component_auth(event)
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