Changeset

7968:f0e35f4db9e0

mod_blocklist: Split long line [luacheck]
author Kim Alvefur <zash@zash.se>
date Thu, 09 Mar 2017 00:59:32 +0100
parents 7966:30309fd01d76
children 7969:1c6a07606309
files plugins/mod_blocklist.lua
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);