diff options
author | Aaron Marks <nymacro@gmail.com> | 2005-07-12 06:50:17 +0000 |
---|---|---|
committer | Aaron Marks <nymacro@gmail.com> | 2005-07-12 06:50:17 +0000 |
commit | 960f631a2be601357424f9e6c5cdc64b68bff856 (patch) | |
tree | 1289e23bfcb98bc302a061600a4787004fda20ac /src/main.cpp | |
parent | e7aaadd01c9f1ff8502326e93bb3edf4a39c0dad (diff) | |
download | manaserv-960f631a2be601357424f9e6c5cdc64b68bff856.tar.gz manaserv-960f631a2be601357424f9e6c5cdc64b68bff856.tar.bz2 manaserv-960f631a2be601357424f9e6c5cdc64b68bff856.tar.xz manaserv-960f631a2be601357424f9e6c5cdc64b68bff856.zip |
Fixed problem with PostgreSQL support (variable was undefined).
Added client/server message type enumerations.
Enabled message handling in ConnectionHandler.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 4b6ec0d8..b26be9ad 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 <code>TMW_WORLD_TICK</code> 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); |