# HG changeset patch # User Kim Alvefur # Date 1538836685 -7200 # Node ID a950f9fa913792601c59cb4c2525a9d752d15934 # Parent 33301038d3e43d282ce055ad72bf0ceb8f5a1d38 mod_version: Reduce scope of variable It is only used in this if block anyways diff -r 33301038d3e4 -r a950f9fa9137 plugins/mod_version.lua --- a/plugins/mod_version.lua Sat Oct 06 16:32:37 2018 +0200 +++ b/plugins/mod_version.lua Sat Oct 06 16:38:05 2018 +0200 @@ -10,13 +10,12 @@ 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