diff --git a/src/network/network.cpp b/src/network/network.cpp --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -217,7 +217,7 @@ bool NetworkCompanyIsPassworded(CompanyI /* This puts a text-message to the console, or in the future, the chat-box, * (to keep it all a bit more general) * If 'self_send' is true, this is the client who is sending the message */ -void NetworkTextMessage(NetworkAction action, TextColour colour, bool self_send, const std::string &name, const std::string &str, int64 data) +void NetworkTextMessage(NetworkAction action, TextColour colour, bool self_send, const std::string &name, const std::string &str, int64 data, const std::string &data_str) { StringID strid; switch (action) { @@ -248,6 +248,7 @@ void NetworkTextMessage(NetworkAction ac case NETWORK_ACTION_CHAT_COMPANY: strid = self_send ? STR_NETWORK_CHAT_TO_COMPANY : STR_NETWORK_CHAT_COMPANY; break; case NETWORK_ACTION_CHAT_CLIENT: strid = self_send ? STR_NETWORK_CHAT_TO_CLIENT : STR_NETWORK_CHAT_CLIENT; break; case NETWORK_ACTION_KICKED: strid = STR_NETWORK_MESSAGE_KICKED; break; + case NETWORK_ACTION_EXTERNAL_CHAT: strid = STR_NETWORK_CHAT_EXTERNAL; break; default: strid = STR_NETWORK_CHAT_ALL; break; } @@ -255,6 +256,7 @@ void NetworkTextMessage(NetworkAction ac SetDParamStr(0, name); SetDParamStr(1, str); SetDParam(2, data); + SetDParamStr(3, data_str); /* All of these strings start with "***". These characters are interpreted as both left-to-right and * right-to-left characters depending on the context. As the next text might be an user's name, the @@ -265,7 +267,7 @@ void NetworkTextMessage(NetworkAction ac Debug(desync, 1, "msg: {:08x}; {:02x}; {}", _date, _date_fract, message); IConsolePrint(colour, message); - NetworkAddChatMessage((TextColour)colour, _settings_client.gui.network_chat_timeout, message); + NetworkAddChatMessage(colour, _settings_client.gui.network_chat_timeout, message); } /* Calculate the frame-lag of a client */