summaryrefslogtreecommitdiff
path: root/src/console_cmds.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-05-02 19:00:59 +0000
committerpeter1138 <peter1138@openttd.org>2007-05-02 19:00:59 +0000
commit15aaaf3c6f48f85a3332228d1597796bb8a626f7 (patch)
treee0837d73738bc7d60afc77bd99b62a5766693106 /src/console_cmds.cpp
parentcc9d811f53b2d7f742682cd31299cd044ea10508 (diff)
downloadopenttd-15aaaf3c6f48f85a3332228d1597796bb8a626f7.tar.xz
(svn r9771) -Feature: (-tte) Add password protected status to 'players' (network server) console command. (mostly dihedral)
Diffstat (limited to 'src/console_cmds.cpp')
-rw-r--r--src/console_cmds.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp
index 47dc27ea0..725f4fe93 100644
--- a/src/console_cmds.cpp
+++ b/src/console_cmds.cpp
@@ -1234,13 +1234,16 @@ DEF_CONSOLE_CMD(ConPlayers)
if (!p->is_active) continue;
+ const NetworkPlayerInfo *npi = &_network_player_info[p->index];
+
GetString(buffer, STR_00D1_DARK_BLUE + _player_colors[p->index], lastof(buffer));
- IConsolePrintF(8, "#:%d(%s) Company Name: '%s' Year Founded: %d Money: %d Loan: %d Value: %" OTTD_PRINTF64 "d (T:%d, R:%d, P:%d, S:%d)",
- p->index + 1, buffer, _network_player_info[p->index].company_name, p->inaugurated_year, p->player_money, p->current_loan, CalculateCompanyValue(p),
- /* trains */ _network_player_info[p->index].num_vehicle[0],
- /* lorry + bus */ _network_player_info[p->index].num_vehicle[1] + _network_player_info[p->index].num_vehicle[2],
- /* planes */ _network_player_info[p->index].num_vehicle[3],
- /* ships */ _network_player_info[p->index].num_vehicle[4]);
+ IConsolePrintF(8, "#:%d(%s) Company Name: '%s' Year Founded: %d Money: %d Loan: %d Value: %" OTTD_PRINTF64 "d (T:%d, R:%d, P:%d, S:%d) %sprotected",
+ p->index + 1, buffer, npi->company_name, p->inaugurated_year, p->player_money, p->current_loan, CalculateCompanyValue(p),
+ /* trains */ npi->num_vehicle[0],
+ /* lorry + bus */ npi->num_vehicle[1] + npi->num_vehicle[2],
+ /* planes */ npi->num_vehicle[3],
+ /* ships */ npi->num_vehicle[4],
+ /* protected */ StrEmpty(npi->password) ? "un" : "");
}
return true;