summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-11-26 17:28:18 +0000
committerrubidium <rubidium@openttd.org>2011-11-26 17:28:18 +0000
commit104adbdb3ab9f6a8da64ff46e9706247a6161141 (patch)
tree17a078550386fbe17a6c6ebc54e4d18ca785caa3
parent435b5a08c4f9a3b9a079da6651bac0b287f0218d (diff)
downloadopenttd-104adbdb3ab9f6a8da64ff46e9706247a6161141.tar.xz
(svn r23337) -Fix [FS#4826]: don't send chat messages to clients that haven't joined yet
-rw-r--r--src/network/network_server.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp
index ebf78a320..9780a537e 100644
--- a/src/network/network_server.cpp
+++ b/src/network/network_server.cpp
@@ -702,6 +702,8 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendCommand(const CommandPacke
*/
NetworkRecvStatus ServerNetworkGameSocketHandler::SendChat(NetworkAction action, ClientID client_id, bool self_send, const char *msg, int64 data)
{
+ if (this->status != STATUS_ACTIVE) return NETWORK_RECV_STATUS_OKAY;
+
Packet *p = new Packet(PACKET_SERVER_CHAT);
p->Send_uint8 (action);