mod_adhoc: Update for new is_admin usage

Tue, 22 Jun 2010 19:04:10 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Tue, 22 Jun 2010 19:04:10 +0100
changeset 3286
e5234625fc42
parent 3285
c116c4b2db5a
child 3287
e425e27c12be

mod_adhoc: Update for new is_admin usage

plugins/adhoc/mod_adhoc.lua file | annotate | diff | comparison | revisions
--- a/plugins/adhoc/mod_adhoc.lua	Tue Jun 22 19:00:01 2010 +0100
+++ b/plugins/adhoc/mod_adhoc.lua	Tue Jun 22 19:04:10 2010 +0100
@@ -15,9 +15,7 @@
 
 module:hook("iq/host/"..xmlns_disco.."#items:query", function (event)
 	local origin, stanza = event.origin, event.stanza;
-	-- TODO: Is this correct, or should is_admin be changed?
-	local privileged = is_admin(stanza.attr.from)
-	    or is_admin(stanza.attr.from, stanza.attr.to); 
+	local privileged = is_admin(stanza.attr.from, stanza.attr.to);
 	if stanza.attr.type == "get" and stanza.tags[1].attr.node
 	    and stanza.tags[1].attr.node == xmlns_cmd then
 		reply = st.reply(stanza);

mercurial