mod_version: Reduce scope of variable
authorKim Alvefur <zash@zash.se>
Sat, 06 Oct 2018 16:38:05 +0200
changeset 9439 a950f9fa9137
parent 9438 33301038d3e4
child 9440 b202aa1e2d7b
mod_version: Reduce scope of variable It is only used in this if block anyways
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