From 1e4153ffc14ac4fcc588f4d4a3749ea88c263264 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 6 Oct 2018 16:38:05 +0200 Subject: mod_version: Reduce scope of variable It is only used in this if block anyways --- plugins/mod_version.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'plugins/mod_version.lua') diff --git a/plugins/mod_version.lua b/plugins/mod_version.lua index 71730ba9..1d24001c 100644 --- a/plugins/mod_version.lua +++ b/plugins/mod_version.lua @@ -10,13 +10,12 @@ local st = require "util.stanza"; module:add_feature("jabber:iq:version"); -local platform; - local query = st.stanza("query", {xmlns = "jabber:iq:version"}) :text_tag("name", "Prosody") :text_tag("version", prosody.version); if not module:get_option_boolean("hide_os_type") then + local platform; if os.getenv("WINDIR") then platform = "Windows"; else -- cgit v1.2.3