mod_blocklist: Split long line [luacheck]
authorKim Alvefur <zash@zash.se>
Thu, 09 Mar 2017 00:59:32 +0100
changeset 7971 f0e35f4db9e0
parent 7969 30309fd01d76
child 7972 1c6a07606309
mod_blocklist: Split long line [luacheck]
plugins/mod_blocklist.lua
--- 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);