diff 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
line wrap: on
line diff
--- a/mod_privilege/mod_privilege.lua	Fri Jul 31 18:44:06 2015 +0200
+++ b/mod_privilege/mod_privilege.lua	Fri Jul 31 18:46:06 2015 +0200
@@ -176,7 +176,9 @@
 	end
 end
 
-connected_cb:add(on_auth)
+if module:get_host_type() ~= "component" then
+    connected_cb:add(on_auth)
+end
 module:hook('authentication-success', on_auth)
 module:hook('component-authenticated', on_component_auth)
 module:hook('presence/initial', on_presence)