diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index 6a33c73d89..f4ad935262 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -1363,15 +1363,17 @@ void NetworkServerSendChat(NetworkAction action, DestType desttype, int dest, co DEBUG(net, 0, "[server] received unknown chat destination type %d. Doing broadcast instead", desttype); /* FALL THROUGH */ case DESTTYPE_BROADCAST: + case DESTTYPE_BROADCAST_SS: FOR_ALL_CLIENT_SOCKETS(cs) { - cs->SendChat(action, from_id, false, msg, data); + cs->SendChat(action, from_id, (desttype == DESTTYPE_BROADCAST_SS && from_id == cs->client_id), msg, data); } NetworkAdminChat(action, desttype, from_id, msg, data, from_admin); ci = NetworkClientInfo::GetByClientID(from_id); if (ci != NULL) { - NetworkTextMessage(action, GetDrawStringCompanyColour(ci->client_playas), false, ci->client_name, msg, data); + NetworkTextMessage(action, GetDrawStringCompanyColour(ci->client_playas), + (desttype == DESTTYPE_BROADCAST_SS && from_id == CLIENT_ID_SERVER), ci->client_name, msg, data); } break; } diff --git a/src/network/network_type.h b/src/network/network_type.h index 3c390c29be..b7319e2a21 100644 --- a/src/network/network_type.h +++ b/src/network/network_type.h @@ -81,6 +81,7 @@ enum NetworkPasswordType { /** Destination of our chat messages. */ enum DestType { DESTTYPE_BROADCAST, ///< Send message/notice to all clients (All) + DESTTYPE_BROADCAST_SS, ///< Send message/notice to all clients (All), but tag the broadcast to self as a self-send DESTTYPE_TEAM, ///< Send message/notice to everyone playing the same company (Team) DESTTYPE_CLIENT, ///< Send message/notice to only a certain client (Private) };