Sat, 19 Sep 2009 11:17:30 +0100
prosody: Add prosody.platform which can be either 'windows', 'posix' or 'unknown'
prosody | file | annotate | diff | comparison | revisions |
--- a/prosody Fri Sep 18 02:48:52 2009 +0100 +++ b/prosody Sat Sep 19 11:17:30 2009 +0100 @@ -93,6 +93,12 @@ prosody.events = require "util.events".new(); + prosody.platform = "unknown"; + if os.getenv("WINDIR") then + prosody.platform = "windows"; + elseif package.config:sub(1,1) == "/" then + prosody.platform = "posix"; + end -- Function to reload the config file function prosody.reload_config()