Comparison

plugins/mod_version.lua @ 7977:01d6298de991

plugins/various: Use type-specific config API
author Kim Alvefur <zash@zash.se>
date Thu, 16 Mar 2017 20:46:06 +0100
parent 5776:bd0ff8ae98a8
child 9227:c0e058633d9a
comparison
equal deleted inserted replaced
7976:2a7ef5fcaa77 7977:01d6298de991
14 14
15 local query = st.stanza("query", {xmlns = "jabber:iq:version"}) 15 local query = st.stanza("query", {xmlns = "jabber:iq:version"})
16 :tag("name"):text("Prosody"):up() 16 :tag("name"):text("Prosody"):up()
17 :tag("version"):text(prosody.version):up(); 17 :tag("version"):text(prosody.version):up();
18 18
19 if not module:get_option("hide_os_type") then 19 if not module:get_option_boolean("hide_os_type") then
20 if os.getenv("WINDIR") then 20 if os.getenv("WINDIR") then
21 version = "Windows"; 21 version = "Windows";
22 else 22 else
23 local os_version_command = module:get_option("os_version_command"); 23 local os_version_command = module:get_option_string("os_version_command");
24 local ok, pposix = pcall(require, "util.pposix"); 24 local ok, pposix = pcall(require, "util.pposix");
25 if not os_version_command and (ok and pposix and pposix.uname) then 25 if not os_version_command and (ok and pposix and pposix.uname) then
26 version = pposix.uname().sysname; 26 version = pposix.uname().sysname;
27 end 27 end
28 if not version then 28 if not version then