Comparison

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
comparison
equal deleted inserted replaced
7966:30309fd01d76 7968:f0e35f4db9e0
226 end 226 end
227 end); 227 end);
228 228
229 -- Buggy clients 229 -- Buggy clients
230 module:hook("iq-error/self/blocklist-push", function (event) 230 module:hook("iq-error/self/blocklist-push", function (event)
231 local origin, stanza = event.origin, event.stanza;
231 local _, condition, text = event.stanza:get_error(); 232 local _, condition, text = event.stanza:get_error();
232 (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 ""); 233 local log = (origin.log or module._log);
234 log("warn", "Client returned an error in response to notification from mod_%s: %s%s%s",
235 module.name, condition, text and ": " or "", text or "");
233 return true; 236 return true;
234 end); 237 end);
235 238
236 local function is_blocked(user, jid) 239 local function is_blocked(user, jid)
237 local blocklist = cache[user] or get_blocklist(user); 240 local blocklist = cache[user] or get_blocklist(user);