Software /
code /
prosody
Diff
plugins/mod_blocklist.lua @ 7968:f0e35f4db9e0
mod_blocklist: Split long line [luacheck]
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 09 Mar 2017 00:59:32 +0100 |
parent | 7775:3733bdbe0b22 |
child | 8040:62c540d51d50 |
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);