Comparison

plugins/mod_component.lua @ 4301:1484ac561b28

mod_component: Small code clarity fix
author Matthew Wild <mwild1@gmail.com>
date Sat, 04 Jun 2011 00:29:55 +0100
parent 3674:4b7281c577b9
child 4323:53f3c3001499
comparison
equal deleted inserted replaced
4300:cfa69c19b428 4301:1484ac561b28
84 -- If component not already created for this host, create one now 84 -- If component not already created for this host, create one now
85 if not main_session then 85 if not main_session then
86 send = session.send; 86 send = session.send;
87 main_session = session; 87 main_session = session;
88 session.on_destroy = on_destroy; 88 session.on_destroy = on_destroy;
89 session.component_validate_from = module:get_option_boolean("validate_from_addresses") ~= false; 89 session.component_validate_from = module:get_option_boolean("validate_from_addresses", true);
90 log("info", "Component successfully authenticated: %s", session.host); 90 log("info", "Component successfully authenticated: %s", session.host);
91 session.send(st.stanza("handshake")); 91 session.send(st.stanza("handshake"));
92 else -- TODO: Implement stanza distribution 92 else -- TODO: Implement stanza distribution
93 log("error", "Multiple components bound to the same address, first one wins: %s", session.host); 93 log("error", "Multiple components bound to the same address, first one wins: %s", session.host);
94 session:close{ condition = "conflict", text = "Component already connected" }; 94 session:close{ condition = "conflict", text = "Component already connected" };