Comparison

mod_host_guard/mod_host_guard.lua @ 724:b94010de43f6

mod_host_guard: referenced configmanager from prosody's _G instead of requiring it.
author Marco Cirillo <maranda@lightwitch.org>
date Mon, 25 Jun 2012 22:32:54 +0000
parent 686:592cfa6cf5d9
child 725:f79fda2d7e51
comparison
equal deleted inserted replaced
723:c26652d055b5 724:b94010de43f6
6 local guard_blockall = module:get_option_set("host_guard_blockall", {}) 6 local guard_blockall = module:get_option_set("host_guard_blockall", {})
7 local guard_ball_wl = module:get_option_set("host_guard_blockall_exceptions", {}) 7 local guard_ball_wl = module:get_option_set("host_guard_blockall_exceptions", {})
8 local guard_protect = module:get_option_set("host_guard_selective", {}) 8 local guard_protect = module:get_option_set("host_guard_selective", {})
9 local guard_block_bl = module:get_option_set("host_guard_blacklist", {}) 9 local guard_block_bl = module:get_option_set("host_guard_blacklist", {})
10 10
11 local config = require "core.configmanager" 11 local config = configmanager
12 local error_reply = require "util.stanza".error_reply 12 local error_reply = require "util.stanza".error_reply
13 13
14 local function s2s_hook (event) 14 local function s2s_hook (event)
15 local origin, stanza = event.session or event.origin, event.stanza or false 15 local origin, stanza = event.session or event.origin, event.stanza or false
16 local to_host, from_host = (not stanza and origin.to_host) or stanza.attr.to, (not stanza and origin.from_host) or stanza.attr.from 16 local to_host, from_host = (not stanza and origin.to_host) or stanza.attr.to, (not stanza and origin.from_host) or stanza.attr.from