summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYohann Ferreira <bertram@cegetel.net>2005-10-24 18:57:44 +0000
committerYohann Ferreira <bertram@cegetel.net>2005-10-24 18:57:44 +0000
commita13d9f0066aabc966fa6d60951b178bf73dc0f1b (patch)
tree1ab242b58b61311c05441847aa7598ef17208865
parent18b932ae7b11a75c3d68141789c42a20bb27396c (diff)
downloadmanaserv-a13d9f0066aabc966fa6d60951b178bf73dc0f1b.tar.gz
manaserv-a13d9f0066aabc966fa6d60951b178bf73dc0f1b.tar.bz2
manaserv-a13d9f0066aabc966fa6d60951b178bf73dc0f1b.tar.xz
manaserv-a13d9f0066aabc966fa6d60951b178bf73dc0f1b.zip
Added more infos at startup.
-rw-r--r--ChangeLog3
-rw-r--r--src/main.cpp24
2 files changed, 24 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index e674e47e..4e958828 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
-2005-10-23 Yohann Ferreira <Bertram@cegetel.net>
+2005-10-24 Yohann Ferreira <Bertram@cegetel.net>
+ * src/main.cpp: Added more useful infos at startup.
* src/dal/dataprovider.h, src/dal/dataprovider.cpp,
src/dal/sqlitedataprovider.cpp, src/dal/mysqldataprovider.cpp,
src/dal/pqdataprovider.cpp, src/main.cpp, src/client.cpp:
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 << "...")