# HG changeset patch # User Kim Alvefur # Date 1530829008 -7200 # Node ID 71500c68fed403b3f957b02e1d28a0310d5beda4 # Parent 188c05e906f17b5204f834bfc0f4e6bb815f8a0a mod_announce: Fix luacheck warnings diff -r 188c05e906f1 -r 71500c68fed4 .luacheckrc --- a/.luacheckrc Fri Jul 06 00:16:17 2018 +0200 +++ b/.luacheckrc Fri Jul 06 00:16:48 2018 +0200 @@ -136,7 +136,6 @@ "plugins/mod_admin_adhoc.lua"; "plugins/mod_admin_telnet.lua"; - "plugins/mod_announce.lua"; "plugins/mod_bosh.lua"; "plugins/mod_groups.lua"; "plugins/mod_http_files.lua"; diff -r 188c05e906f1 -r 71500c68fed4 plugins/mod_announce.lua --- a/plugins/mod_announce.lua Fri Jul 06 00:16:17 2018 +0200 +++ b/plugins/mod_announce.lua Fri Jul 06 00:16:48 2018 +0200 @@ -37,7 +37,7 @@ -- Old -based jabberd-style announcement sending function handle_announcement(event) - local origin, stanza = event.origin, event.stanza; + local stanza = event.stanza; local node, host, resource = jid.split(stanza.attr.to); if resource ~= "announce/online" then @@ -72,7 +72,7 @@ { name = "announcement", type = "text-multi", required = true, label = "Announcement" }; }; -function announce_handler(self, data, state) +function announce_handler(_, data, state) if state then if data.action == "cancel" then return { status = "canceled" };