summaryrefslogtreecommitdiff
path: root/src/main_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main_gui.cpp')
-rw-r--r--src/main_gui.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp
index 905aa8458..8fc7a4ea0 100644
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -49,14 +49,15 @@ void CcGiveMoney(bool success, TileIndex tile, uint32 p1, uint32 p2)
#ifdef ENABLE_NETWORK
if (!success || !_settings_game.economy.give_money) return;
- char msg[20];
/* Inform the company of the action of one of it's clients (controllers). */
- snprintf(msg, sizeof(msg), "%d", p1);
+ char msg[64];
+ SetDParam(0, p2);
+ GetString(msg, STR_COMPANY_NAME, lastof(msg));
if (!_network_server) {
- NetworkClientSendChat(NETWORK_ACTION_GIVE_MONEY, DESTTYPE_TEAM, p2, msg);
+ NetworkClientSendChat(NETWORK_ACTION_GIVE_MONEY, DESTTYPE_TEAM, p2, msg, p1);
} else {
- NetworkServerSendChat(NETWORK_ACTION_GIVE_MONEY, DESTTYPE_TEAM, p2, msg, CLIENT_ID_SERVER);
+ NetworkServerSendChat(NETWORK_ACTION_GIVE_MONEY, DESTTYPE_TEAM, p2, msg, CLIENT_ID_SERVER, p1);
}
#endif /* ENABLE_NETWORK */
}