Changeset

8043:e7561d56008d

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Sat, 01 Apr 2017 22:38:02 +0200
parents 8039:1f4bd8009961 (current diff) 8042:5d5afaafac0f (diff)
children 8044:e38e3300b955
files
diffstat 3 files changed, 14 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_blocklist.lua	Sat Apr 01 21:48:54 2017 +0200
+++ b/plugins/mod_blocklist.lua	Sat Apr 01 22:38:02 2017 +0200
@@ -229,7 +229,7 @@
 -- Buggy clients
 module:hook("iq-error/self/blocklist-push", function (event)
 	local origin, stanza = event.origin, event.stanza;
-	local _, condition, text = event.stanza:get_error();
+	local _, condition, text = stanza:get_error();
 	local log = (origin.log or module._log);
 	log("warn", "Client returned an error in response to notification from mod_%s: %s%s%s",
 		module.name, condition, text and ": " or "", text or "");
--- a/plugins/mod_disco.lua	Sat Apr 01 21:48:54 2017 +0200
+++ b/plugins/mod_disco.lua	Sat Apr 01 22:38:02 2017 +0200
@@ -101,10 +101,10 @@
 	local node = stanza.tags[1].attr.node;
 	if node and node ~= "" and node ~= "http://prosody.im#"..get_server_caps_hash() then
 		local reply = st.reply(stanza):tag('query', {xmlns='http://jabber.org/protocol/disco#info', node=node});
-		local event = { origin = origin, stanza = stanza, reply = reply, node = node, exists = false};
-		local ret = module:fire_event("host-disco-info-node", event);
+		local node_event = { origin = origin, stanza = stanza, reply = reply, node = node, exists = false};
+		local ret = module:fire_event("host-disco-info-node", node_event);
 		if ret ~= nil then return ret; end
-		if event.exists then
+		if node_event.exists then
 			origin.send(reply);
 		else
 			origin.send(st.error_reply(stanza, "cancel", "item-not-found", "Node does not exist"));
@@ -123,10 +123,10 @@
 	local node = stanza.tags[1].attr.node;
 	if node and node ~= "" then
 		local reply = st.reply(stanza):tag('query', {xmlns='http://jabber.org/protocol/disco#items', node=node});
-		local event = { origin = origin, stanza = stanza, reply = reply, node = node, exists = false};
-		local ret = module:fire_event("host-disco-items-node", event);
+		local node_event = { origin = origin, stanza = stanza, reply = reply, node = node, exists = false};
+		local ret = module:fire_event("host-disco-items-node", node_event);
 		if ret ~= nil then return ret; end
-		if event.exists then
+		if node_event.exists then
 			origin.send(reply);
 		else
 			origin.send(st.error_reply(stanza, "cancel", "item-not-found", "Node does not exist"));
@@ -163,10 +163,10 @@
 		if node and node ~= "" then
 			local reply = st.reply(stanza):tag('query', {xmlns='http://jabber.org/protocol/disco#info', node=node});
 			if not reply.attr.from then reply.attr.from = origin.username.."@"..origin.host; end -- COMPAT To satisfy Psi when querying own account
-			local event = { origin = origin, stanza = stanza, reply = reply, node = node, exists = false};
-			local ret = module:fire_event("account-disco-info-node", event);
+			local node_event = { origin = origin, stanza = stanza, reply = reply, node = node, exists = false};
+			local ret = module:fire_event("account-disco-info-node", node_event);
 			if ret ~= nil then return ret; end
-			if event.exists then
+			if node_event.exists then
 				origin.send(reply);
 			else
 				origin.send(st.error_reply(stanza, "cancel", "item-not-found", "Node does not exist"));
@@ -189,10 +189,10 @@
 		if node and node ~= "" then
 			local reply = st.reply(stanza):tag('query', {xmlns='http://jabber.org/protocol/disco#items', node=node});
 			if not reply.attr.from then reply.attr.from = origin.username.."@"..origin.host; end -- COMPAT To satisfy Psi when querying own account
-			local event = { origin = origin, stanza = stanza, reply = reply, node = node, exists = false};
-			local ret = module:fire_event("account-disco-items-node", event);
+			local node_event = { origin = origin, stanza = stanza, reply = reply, node = node, exists = false};
+			local ret = module:fire_event("account-disco-items-node", node_event);
 			if ret ~= nil then return ret; end
-			if event.exists then
+			if node_event.exists then
 				origin.send(reply);
 			else
 				origin.send(st.error_reply(stanza, "cancel", "item-not-found", "Node does not exist"));
--- a/plugins/mod_saslauth.lua	Sat Apr 01 21:48:54 2017 +0200
+++ b/plugins/mod_saslauth.lua	Sat Apr 01 22:38:02 2017 +0200
@@ -82,7 +82,7 @@
 	return true;
 end
 
-module:hook_tag(xmlns_sasl, "success", function (session, stanza)
+module:hook_tag(xmlns_sasl, "success", function (session)
 	if session.type ~= "s2sout_unauthed" or session.external_auth ~= "attempting" then return; end
 	module:log("debug", "SASL EXTERNAL with %s succeeded", session.to_host);
 	session.external_auth = "succeeded"