prosody

changeset 1311
fc113027a1d5
parent 1298
4e0db19e5f1c
child 1313
6c7347696caa
--- a/prosody	Fri Jun 05 01:13:39 2009 +0100
+++ b/prosody	Fri Jun 05 01:27:18 2009 +0100
@@ -87,6 +87,17 @@
 
 prosody.events = require "util.events".new();
 
+-- Try to determine version
+local version_file = io.open((CFG_SOURCEDIR or ".").."/prosody.version");
+if version_file then
+	prosody.version = version_file:read("*a"):gsub("%s*$", "");
+	version_file:close();
+else
+	prosody.version = "unknown";
+end
+
+log("info", "Hello and welcome to Prosody version %s", prosody.version);
+
 --- Load and initialise core modules
 require "util.import"
 require "core.xmlhandlers"

mercurial