aboutsummaryrefslogtreecommitdiffstats
path: root/prosody
diff options
context:
space:
mode:
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()