Merge branch 'send_money_company' into jgrpp

This commit is contained in:
Jonathan G Rennison
2017-03-03 22:42:07 +00:00
75 changed files with 237 additions and 204 deletions

View File

@@ -1664,8 +1664,7 @@ NetworkCompanyInfo *GetLobbyCompanyInfo(CompanyID company)
}
/* The window below gives information about the connected clients
* and also makes able to give money to them, kick them (if server)
* and stuff like that. */
* and also makes able to kick them (if server) and stuff like that. */
extern void DrawCompanyIcon(CompanyID cid, int x, int y);
@@ -1697,11 +1696,6 @@ static void ClientList_Ban(const NetworkClientInfo *ci)
NetworkServerKickOrBanIP(ci->client_id, true);
}
static void ClientList_GiveMoney(const NetworkClientInfo *ci)
{
ShowNetworkGiveMoneyWindow(ci->client_playas);
}
static void ClientList_SpeakToClient(const NetworkClientInfo *ci)
{
ShowNetworkChatQueryWindow(DESTTYPE_CLIENT, ci->client_id);
@@ -1760,13 +1754,6 @@ struct NetworkClientListPopupWindow : Window {
}
this->AddAction(STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL, &ClientList_SpeakToAll);
if (_network_own_client_id != ci->client_id) {
/* We are no spectator and the company we want to give money to is no spectator and money gifts are allowed. */
if (Company::IsValidID(_local_company) && Company::IsValidID(ci->client_playas) && _settings_game.economy.give_money) {
this->AddAction(STR_NETWORK_CLIENTLIST_GIVE_MONEY, &ClientList_GiveMoney);
}
}
/* A server can kick clients (but not himself). */
if (_network_server && _network_own_client_id != ci->client_id) {
this->AddAction(STR_NETWORK_CLIENTLIST_KICK, &ClientList_Kick);