Changeset

818:bf23a8966e20

mod_host_guard: fix typos into the code, the operators were supposed to be "not equal".
author Marco Cirillo <maranda@lightwitch.org>
date Wed, 12 Sep 2012 22:05:57 +0000
parents 817:f826b5935175
children 819:1e0d273bcb75
files mod_host_guard/mod_host_guard.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mod_host_guard/mod_host_guard.lua	Wed Sep 12 20:08:48 2012 +0000
+++ b/mod_host_guard/mod_host_guard.lua	Wed Sep 12 22:05:57 2012 +0000
@@ -42,7 +42,7 @@
 
 local function handle_activation (host, u)
 	if guard_blockall:contains(host) or guard_protect:contains(host) then
-		if hosts[host] and config.get(host, "core", "authentication") == "anonymous" then
+		if hosts[host] and config.get(host, "core", "authentication") ~= "anonymous" then
 			hosts[host].events.add_handler("s2sin-established", s2s_hook, 500)
 			hosts[host].events.add_handler("route/remote", rr_hook, 500)
 			hosts[host].events.add_handler("stanza/jabber:server:dialback:result", s2s_hook, 500)
@@ -57,7 +57,7 @@
 
 local function handle_deactivation (host, u, i)
 	if guard_blockall:contains(host) or guard_protect:contains(host) then
-		if hosts[host] and config.get(host, "core", "authentication") == "anonymous" then
+		if hosts[host] and config.get(host, "core", "authentication") ~= "anonymous" then
 			hosts[host].events.remove_handler("s2sin-established", s2s_hook)
 			hosts[host].events.remove_handler("route/remote", rr_hook)
 			hosts[host].events.remove_handler("stanza/jabber:server:dialback:result", s2s_hook)