From 960f631a2be601357424f9e6c5cdc64b68bff856 Mon Sep 17 00:00:00 2001 From: Aaron Marks Date: Tue, 12 Jul 2005 06:50:17 +0000 Subject: Fixed problem with PostgreSQL support (variable was undefined). Added client/server message type enumerations. Enabled message handling in ConnectionHandler. --- src/main.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 4b6ec0d..b26be9a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -73,6 +73,7 @@ bool running = true; /**< Determines if server keeps running */ Skill skillTree("base"); /**< Skill tree */ Configuration config; /**< XML config reader */ +AccountHandler *accountHandler = new AccountHandler(); /**< Account message handler */ /** * SDL timer callback, sends a TMW_WORLD_TICK event. @@ -161,6 +162,9 @@ void deinitialize() delete script; #endif + // destro account handler + delete accountHandler; + // Get rid of persistent data storage tmwserv::Storage::destroy(); } @@ -193,8 +197,9 @@ int main(int argc, char *argv[]) // to the constructor of the account handler, upon which is would register // itself for the messages it handles. // - //AccountHandler *accountHandler = new AccountHandler(); - //connectionHandler->registerHandler(C2S_LOGIN, accountHandler); + + // Register message handlers + connectionHandler->registerHandler(MSG_LOGIN, accountHandler); LOG_INFO("The Mana World Server v" << PACKAGE_VERSION) session->startListen(connectionHandler.get(), SERVER_PORT); -- cgit