diff options
author | megamage <none@none> | 2009-01-17 13:33:07 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-01-17 13:33:07 -0600 |
commit | c5dfe7dac27a0441192af758dc55e6c71c83ccb4 (patch) | |
tree | e9075c32f9cd1176090e1530f5aaae247d3bc867 /src/trinitycore/Main.cpp | |
parent | 88fd7455323b0e58ea2b808510d8c7e5aa1cd599 (diff) | |
parent | adeb696f756739e2ed5b9c3ef4f7551ce023ff2b (diff) |
*Merge.
--HG--
branch : trunk
Diffstat (limited to 'src/trinitycore/Main.cpp')
-rw-r--r-- | src/trinitycore/Main.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/trinitycore/Main.cpp b/src/trinitycore/Main.cpp index a4bcf717d62..4c85ecd6d68 100644 --- a/src/trinitycore/Main.cpp +++ b/src/trinitycore/Main.cpp @@ -1,4 +1,4 @@ -/* +/* * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> * * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> @@ -21,6 +21,8 @@ /// \addtogroup Trinityd Trinity Daemon /// @{ /// \file +#include "SystemConfig.h" +#include "revision.h" #include "Common.h" #include "Database/DatabaseEnv.h" @@ -62,6 +64,7 @@ uint32 realmID; ///< Id of the realm void usage(const char *prog) { sLog.outString("Usage: \n %s [<options>]\n" + " --version print version and exist\n\r" " -c config_file use config_file as configuration file\n\r" #ifdef WIN32 " Running as service functions:\n\r" @@ -92,6 +95,12 @@ extern int main(int argc, char **argv) cfg_file = argv[c]; } + if( strcmp(argv[c],"--version") == 0) + { + printf("%s\n", _FULLVERSION); + return 0; + } + #ifdef WIN32 //////////// //Services// @@ -138,7 +147,7 @@ extern int main(int argc, char **argv) return 1; } sLog.outString("Using configuration file %s.", cfg_file); - + uint32 confVersion = sConfig.GetIntDefault("ConfVersion", 0); if (confVersion < _TRINITY_CORE_CONFVER) { |