diff options
author | Philipp Sehmisch <crush@themanaworld.org> | 2009-02-24 13:53:53 +0100 |
---|---|---|
committer | Philipp Sehmisch <crush@themanaworld.org> | 2009-02-24 13:55:43 +0100 |
commit | 5ea5371434b76fc7511db4fa5b72e34046497943 (patch) | |
tree | 5706052096835f8f9aab19775fc633f681088a70 | |
parent | f207bb487da57911350e037d5f894a037fbd74eb (diff) | |
download | manaserv-5ea5371434b76fc7511db4fa5b72e34046497943.tar.gz manaserv-5ea5371434b76fc7511db4fa5b72e34046497943.tar.bz2 manaserv-5ea5371434b76fc7511db4fa5b72e34046497943.tar.xz manaserv-5ea5371434b76fc7511db4fa5b72e34046497943.zip |
Forgot two config key renames and a little style fix
-rw-r--r-- | src/account-server/accounthandler.cpp | 3 | ||||
-rw-r--r-- | src/account-server/main-account.cpp | 2 | ||||
-rw-r--r-- | src/game-server/main-game.cpp | 4 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/account-server/accounthandler.cpp b/src/account-server/accounthandler.cpp index cca17be9..a0369201 100644 --- a/src/account-server/accounthandler.cpp +++ b/src/account-server/accounthandler.cpp @@ -195,7 +195,8 @@ static void handleLoginMessage(AccountClient &computer, MessageIn &msg) return; } - if (accountHandler->getClientNumber() >= (unsigned)Configuration::getValue("net_maxClients", 1000) ) + unsigned maxClients = (unsigned)Configuration::getValue("net_maxClients", 1000); + if (accountHandler->getClientNumber() >= maxClients) { reply.writeByte(ERRMSG_SERVER_FULL); computer.send(reply); diff --git a/src/account-server/main-account.cpp b/src/account-server/main-account.cpp index 90c30a51..7fec91b2 100644 --- a/src/account-server/main-account.cpp +++ b/src/account-server/main-account.cpp @@ -314,7 +314,7 @@ int main(int argc, char *argv[]) // General Initialization initialize(); - int port = Configuration::getValue("accountServerPort", DEFAULT_SERVER_PORT); + int port = Configuration::getValue("net_accountServerPort", DEFAULT_SERVER_PORT); if (!AccountClientHandler::initialize(port) || !GameServerHandler::initialize(port + 1) || !chatHandler->startListen(port + 2)) diff --git a/src/game-server/main-game.cpp b/src/game-server/main-game.cpp index 86dc7e22..0824a8d1 100644 --- a/src/game-server/main-game.cpp +++ b/src/game-server/main-game.cpp @@ -255,7 +255,7 @@ void parseOptions(int argc, char *argv[]) // Change the port to listen on. unsigned short portToListenOn; portToListenOn = atoi(optarg); - Configuration::setValue("gameServerPort", portToListenOn); + Configuration::setValue("net_gameServerPort", portToListenOn); LOG_INFO("Setting default port to " << portToListenOn); break; } @@ -283,7 +283,7 @@ int main(int argc, char *argv[]) accountHandler->start(); int gameServerPort = - Configuration::getValue("gameServerPort", DEFAULT_SERVER_PORT + 3); + Configuration::getValue("net_gameServerPort", DEFAULT_SERVER_PORT + 3); if (!gameHandler->startListen(gameServerPort)) { |