diff options
author | Yohann Ferreira <bertram@cegetel.net> | 2005-10-24 18:57:44 +0000 |
---|---|---|
committer | Yohann Ferreira <bertram@cegetel.net> | 2005-10-24 18:57:44 +0000 |
commit | a13d9f0066aabc966fa6d60951b178bf73dc0f1b (patch) | |
tree | 1ab242b58b61311c05441847aa7598ef17208865 /src | |
parent | 18b932ae7b11a75c3d68141789c42a20bb27396c (diff) | |
download | manaserv-a13d9f0066aabc966fa6d60951b178bf73dc0f1b.tar.gz manaserv-a13d9f0066aabc966fa6d60951b178bf73dc0f1b.tar.bz2 manaserv-a13d9f0066aabc966fa6d60951b178bf73dc0f1b.tar.xz manaserv-a13d9f0066aabc966fa6d60951b178bf73dc0f1b.zip |
Added more infos at startup.
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index d9d627e8..337d7cd2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -28,6 +28,10 @@ #include <cstdlib> +#ifdef __USE_UNIX98 +#include "../config.h" +#endif + #include "netsession.h" #include "connectionhandler.h" #include "accounthandler.h" @@ -62,7 +66,7 @@ std::string scriptLanguage = "squirrel"; #endif // SCRIPT_SUPPORT #define LOG_FILE "tmwserv.log" -#define SERVER_VERSION "Pre-Milestone1" + #define TMW_WORLD_TICK SDL_USEREVENT #define SERVER_PORT 9601 @@ -131,6 +135,18 @@ void initialize() if (scriptLanguage == "squirrel") { script = new ScriptSquirrel("main.nut"); } +#else + LOG_WARN("No Scripting Language Support.") +#endif + +#if defined (MYSQL_SUPPORT) + LOG_INFO("Using MySQL DB Backend.") +#elif defined (POSTGRESQL_SUPPORT) + LOG_INFO("Using PostGreSQL DB Backend.") +#elif defined (SQLITE_SUPPORT) + LOG_INFO("Using SQLite DB Backend.") +#else + LOG_WARN("No Database Backend Support.") #endif // initialize configuration @@ -146,6 +162,8 @@ void initialize() #endif configPath += "/.tmwserv.xml"; config.init(configPath); + LOG_INFO("Using Config File: " << configPath) + LOG_INFO("Using Log File: " << LOG_FILE) } @@ -183,6 +201,9 @@ void deinitialize() */ int main(int argc, char *argv[]) { +#ifdef __USE_UNIX98 + LOG_INFO("The Mana World Server v" << PACKAGE_VERSION) +#endif initialize(); // Ready for server work... @@ -214,7 +235,6 @@ int main(int argc, char *argv[]) connectionHandler->registerHandler(CMSG_USE_ITEM, gameHandler); // NOTE: this is probably redundant (CMSG_USE_OBJECT) connectionHandler->registerHandler(CMSG_EQUIP, gameHandler); - LOG_INFO("The Mana World Server v" << SERVER_VERSION) session->startListen(connectionHandler.get(), SERVER_PORT); LOG_INFO("Listening on port " << SERVER_PORT << "...") |