diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-09-19 11:17:30 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-09-19 11:17:30 +0100 |
commit | f3a0d9f41f3e82398a76361952ce1fdbbaeff5c3 (patch) | |
tree | fbb612fab83146b93fb70ef4e5a15e515dce221d | |
parent | 13c1162f2fbba04baa1bb01712fdab305ec5f1aa (diff) | |
download | prosody-f3a0d9f41f3e82398a76361952ce1fdbbaeff5c3.tar.gz prosody-f3a0d9f41f3e82398a76361952ce1fdbbaeff5c3.zip |
prosody: Add prosody.platform which can be either 'windows', 'posix' or 'unknown'
-rwxr-xr-x | prosody | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -93,6 +93,12 @@ function init_global_state() 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() |