summaryrefslogtreecommitdiff
path: root/src/console_cmds.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-06-03 08:04:35 +0000
committerrubidium <rubidium@openttd.org>2008-06-03 08:04:35 +0000
commitabf2b0efc36e09caac75ad777af6842a16b66d22 (patch)
treef4465a975b5e0a16c9e1057ed8b9c384ae16a443 /src/console_cmds.cpp
parent4b4e73c1dd6c77a5876f826a45af1263b1b3eb96 (diff)
downloadopenttd-abf2b0efc36e09caac75ad777af6842a16b66d22.tar.xz
(svn r13369) -Codechange: remove duplication of network configuration settings between NetworkSettings and NetworkGameInfo.
-Fix: failure of changing the server password during games because the password wasn't duplicated properly.
Diffstat (limited to 'src/console_cmds.cpp')
-rw-r--r--src/console_cmds.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp
index 4eee5e3ce..b0bd54b59 100644
--- a/src/console_cmds.cpp
+++ b/src/console_cmds.cpp
@@ -538,18 +538,15 @@ DEF_CONSOLE_CMD(ConStatus)
DEF_CONSOLE_CMD(ConServerInfo)
{
- const NetworkGameInfo *gi;
-
if (argc == 0) {
IConsoleHelp("List current and maximum client/player limits. Usage 'server_info'");
IConsoleHelp("You can change these values by setting the variables 'max_clients', 'max_companies' and 'max_spectators'");
return true;
}
- gi = &_network_game_info;
- IConsolePrintF(CC_DEFAULT, "Current/maximum clients: %2d/%2d", gi->clients_on, gi->clients_max);
- IConsolePrintF(CC_DEFAULT, "Current/maximum companies: %2d/%2d", ActivePlayerCount(), gi->companies_max);
- IConsolePrintF(CC_DEFAULT, "Current/maximum spectators: %2d/%2d", NetworkSpectatorCount(), gi->spectators_max);
+ IConsolePrintF(CC_DEFAULT, "Current/maximum clients: %2d/%2d", _network_game_info.clients_on, _settings_client.network.max_clients);
+ IConsolePrintF(CC_DEFAULT, "Current/maximum companies: %2d/%2d", ActivePlayerCount(), _settings_client.network.max_companies);
+ IConsolePrintF(CC_DEFAULT, "Current/maximum spectators: %2d/%2d", NetworkSpectatorCount(), _settings_client.network.max_spectators);
return true;
}