Software /
code /
prosody
Comparison
plugins/mod_blocklist.lua @ 8040:62c540d51d50
mod_blocklist: Use local variable [luacheck]
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 01 Apr 2017 22:18:44 +0200 |
parent | 7968:f0e35f4db9e0 |
child | 8275:13dad833e821 |
comparison
equal
deleted
inserted
replaced
8038:cd6cef579e82 | 8040:62c540d51d50 |
---|---|
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 origin, stanza = event.origin, event.stanza; |
232 local _, condition, text = event.stanza:get_error(); | 232 local _, condition, text = stanza:get_error(); |
233 local log = (origin.log or module._log); | 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", | 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 ""); | 235 module.name, condition, text and ": " or "", text or ""); |
236 return true; | 236 return true; |
237 end); | 237 end); |