48 |
48 |
49 |
49 |
50 -- Authenticated now |
50 -- Authenticated now |
51 log("info", "Component authenticated: %s", session.host); |
51 log("info", "Component authenticated: %s", session.host); |
52 |
52 |
|
53 session.component_validate_from = module:get_option_boolean("validate_from_addresses") ~= false; |
|
54 |
53 -- If component not already created for this host, create one now |
55 -- If component not already created for this host, create one now |
54 if not hosts[session.host].connected then |
56 if not hosts[session.host].connected then |
55 local send = session.send; |
57 local send = session.send; |
56 session.component_session = cm_register_component(session.host, function (_, data) |
58 session.component_session = cm_register_component(session.host, function (_, data) |
57 if data.attr and data.attr.xmlns == "jabber:client" then |
59 if data.attr and data.attr.xmlns == "jabber:client" then |