Software /
code /
prosody
Changeset
1789:23a66fdf541e
prosody: Add prosody.platform which can be either 'windows', 'posix' or 'unknown'
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 19 Sep 2009 11:17:30 +0100 |
parents | 1788:45779d67c26c |
children | 1790:f06688f9b6c6 |
files | prosody |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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()