From 5ea5371434b76fc7511db4fa5b72e34046497943 Mon Sep 17 00:00:00 2001 From: Philipp Sehmisch Date: Tue, 24 Feb 2009 13:53:53 +0100 Subject: Forgot two config key renames and a little style fix --- src/account-server/accounthandler.cpp | 3 ++- src/account-server/main-account.cpp | 2 +- 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)) { -- cgit v1.2.3-60-g2f50