comparison mod_privilege/mod_privilege.lua @ 1775:0d78bb31348e

mod_privilege: fixed bad calling of on_auth for components
author Goffi <goffi@goffi.org>
date Fri, 31 Jul 2015 18:46:06 +0200
parents ad7afcf86131
children f719d5e6c627
comparison
equal deleted inserted replaced
1774:7bfc23b2c038 1775:0d78bb31348e
174 for callback in connected_cb:items() do 174 for callback in connected_cb:items() do
175 callback(event) 175 callback(event)
176 end 176 end
177 end 177 end
178 178
179 connected_cb:add(on_auth) 179 if module:get_host_type() ~= "component" then
180 connected_cb:add(on_auth)
181 end
180 module:hook('authentication-success', on_auth) 182 module:hook('authentication-success', on_auth)
181 module:hook('component-authenticated', on_component_auth) 183 module:hook('component-authenticated', on_component_auth)
182 module:hook('presence/initial', on_presence) 184 module:hook('presence/initial', on_presence)
183 185
184 186