comparison mod_host_blacklist/mod_host_blacklist.lua @ 1181:005b0429cf46

mod_host_blacklist: Small fix
author Matthew Wild <mwild1@gmail.com>
date Tue, 03 Sep 2013 11:15:18 +0100
parents 513aa2e0c045
children 547b3c05cc06
comparison
equal deleted inserted replaced
1180:513aa2e0c045 1181:005b0429cf46
5 5
6 local blacklist = module:get_option_inherited_set("host_blacklist", {}); 6 local blacklist = module:get_option_inherited_set("host_blacklist", {});
7 7
8 local function stanza_checker(attr) 8 local function stanza_checker(attr)
9 return function (event) 9 return function (event)
10 local host = select(2, jid_split(stanza.attr[attr])); 10 local host = select(2, jid_split(event.stanza.attr[attr]));
11 if blacklist:contains(host) then 11 if blacklist:contains(host) then
12 module:send(st.error_reply(event.stanza, "cancel", "not-allowed", "Communication with this domain is restricted")); 12 module:send(st.error_reply(event.stanza, "cancel", "not-allowed", "Communication with this domain is restricted"));
13 end 13 end
14 end 14 end
15 end 15 end