aboutsummaryrefslogtreecommitdiffstats
path: root/prosody
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-09-19 11:17:30 +0100
committerMatthew Wild <mwild1@gmail.com>2009-09-19 11:17:30 +0100
commitf3a0d9f41f3e82398a76361952ce1fdbbaeff5c3 (patch)
treefbb612fab83146b93fb70ef4e5a15e515dce221d /prosody
parent13c1162f2fbba04baa1bb01712fdab305ec5f1aa (diff)
downloadprosody-f3a0d9f41f3e82398a76361952ce1fdbbaeff5c3.tar.gz
prosody-f3a0d9f41f3e82398a76361952ce1fdbbaeff5c3.zip
prosody: Add prosody.platform which can be either 'windows', 'posix' or 'unknown'
Diffstat (limited to 'prosody')
-rwxr-xr-xprosody6
1 files changed, 6 insertions, 0 deletions
diff --git a/prosody b/prosody
index 0618a1f3..18cb5544 100755
--- a/prosody
+++ b/prosody
@@ -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()