changeset 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 (2015-07-31)
parents 7bfc23b2c038
children e7b5ab44339c
files mod_privilege/mod_privilege.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
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)