Comparison

mod_host_guard/mod_host_guard.lua @ 726:455a9b8fac27

mod_host_guard: removed redundant cleanup code (tested it's completely unrequired).
author Marco Cirillo <maranda@lightwitch.org>
date Mon, 25 Jun 2012 23:53:40 +0000
parent 725:f79fda2d7e51
child 727:99f5846bcd85
comparison
equal deleted inserted replaced
725:f79fda2d7e51 726:455a9b8fac27
62 end 62 end
63 end 63 end
64 64
65 local function init_hosts() 65 local function init_hosts()
66 for n in pairs(hosts) do 66 for n in pairs(hosts) do
67 -- This is a bit redundant but better safe then sorry.
68 hosts[n].events.remove_handler("s2sin-established", s2s_hook)
69 hosts[n].events.remove_handler("route/remote", rr_hook)
70 hosts[n].events.remove_handler("stanza/jabber:server:dialback:result", s2s_hook)
71 if guard_blockall:contains(n) or guard_protect:contains(n) then handle_activation(n) end 67 if guard_blockall:contains(n) or guard_protect:contains(n) then handle_activation(n) end
72 end 68 end
73 end 69 end
74 70
75 local function reload() 71 local function reload()
103 if prosody.start_time then 99 if prosody.start_time then
104 setup() 100 setup()
105 else 101 else
106 module:hook ("server-started", setup) 102 module:hook ("server-started", setup)
107 end 103 end
108