plugins/mod_blocklist.lua
changeset 7971 f0e35f4db9e0
parent 7778 3733bdbe0b22
child 8043 62c540d51d50
--- a/plugins/mod_blocklist.lua	Tue Mar 07 22:36:43 2017 +0100
+++ b/plugins/mod_blocklist.lua	Thu Mar 09 00:59:32 2017 +0100
@@ -228,8 +228,11 @@
 
 -- 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();
-	(event.origin.log or module._log)("warn", "Client returned an error in response to notification from mod_%s: %s%s%s", module.name, condition, text and ": " or "", text or "");
+	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 "");
 	return true;
 end);