mod_component: Read validate_from_addresses option from the config

Sun, 04 Jul 2010 19:14:27 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Sun, 04 Jul 2010 19:14:27 +0100
changeset 3319
95fc08869273
parent 3318
8d09b21aeaa9
child 3320
517ae40a12a2

mod_component: Read validate_from_addresses option from the config

plugins/mod_component.lua file | annotate | diff | comparison | revisions
--- a/plugins/mod_component.lua	Sat Jul 03 18:13:54 2010 +0500
+++ b/plugins/mod_component.lua	Sun Jul 04 19:14:27 2010 +0100
@@ -50,6 +50,8 @@
 	-- Authenticated now
 	log("info", "Component authenticated: %s", session.host);
 	
+	session.component_validate_from = module:get_option_boolean("validate_from_addresses") ~= false;
+	
 	-- If component not already created for this host, create one now
 	if not hosts[session.host].connected then
 		local send = session.send;

mercurial