mod_announce: Fix luacheck warnings
authorKim Alvefur <zash@zash.se>
Fri, 06 Jul 2018 00:16:48 +0200
changeset 8977 71500c68fed4
parent 8976 188c05e906f1
child 8978 47dd2e850781
mod_announce: Fix luacheck warnings
.luacheckrc
plugins/mod_announce.lua
--- 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";
--- 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 <message>-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" };