mod_iq: Remove unused import of jid.split, bare_sessions and don't unpack event.origin when it isn't used. Waqas.
authorMatthew Wild <mwild1@gmail.com>
Sat, 28 Apr 2012 03:39:12 +0100
changeset 4760 55501fc4394b
parent 4759 c4a0c420d232
child 4761 178f252c31b0
mod_iq: Remove unused import of jid.split, bare_sessions and don't unpack event.origin when it isn't used. Waqas.
plugins/mod_iq.lua
--- a/plugins/mod_iq.lua	Sat Apr 28 03:34:58 2012 +0100
+++ b/plugins/mod_iq.lua	Sat Apr 28 03:39:12 2012 +0100
@@ -8,10 +8,8 @@
 
 
 local st = require "util.stanza";
-local jid_split = require "util.jid".split;
 
 local full_sessions = full_sessions;
-local bare_sessions = bare_sessions;
 
 if module:get_host_type() == "local" then
 	module:hook("iq/full", function(data)
@@ -33,7 +31,7 @@
 
 module:hook("iq/bare", function(data)
 	-- IQ to bare JID recieved
-	local origin, stanza = data.origin, data.stanza;
+	local stanza = data.stanza;
 	local type = stanza.attr.type;
 
 	-- TODO fire post processing events
@@ -49,7 +47,7 @@
 
 module:hook("iq/self", function(data)
 	-- IQ to self JID recieved
-	local origin, stanza = data.origin, data.stanza;
+	local stanza = data.stanza;
 	local type = stanza.attr.type;
 
 	if type == "get" or type == "set" then
@@ -64,7 +62,7 @@
 
 module:hook("iq/host", function(data)
 	-- IQ to a local host recieved
-	local origin, stanza = data.origin, data.stanza;
+	local stanza = data.stanza;
 	local type = stanza.attr.type;
 
 	if type == "get" or type == "set" then