From f3a0d9f41f3e82398a76361952ce1fdbbaeff5c3 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sat, 19 Sep 2009 11:17:30 +0100 Subject: prosody: Add prosody.platform which can be either 'windows', 'posix' or 'unknown' --- prosody | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'prosody') 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() -- cgit v1.2.3