Disable chat for the first 5s (configurable) after joining a server.
This commit is contained in:
@@ -34,6 +34,21 @@ namespace OpenRA.Network
|
||||
TextNotificationsManager.AddSystemLine(order.TargetString);
|
||||
break;
|
||||
|
||||
case "DisableChatEntry":
|
||||
{
|
||||
// Order must originate from the server
|
||||
if (clientId != 0)
|
||||
break;
|
||||
|
||||
// Server may send MaxValue to indicate that it is disabled until further notice
|
||||
if (order.ExtraData == uint.MaxValue)
|
||||
TextNotificationsManager.ChatDisabledUntil = uint.MaxValue;
|
||||
else
|
||||
TextNotificationsManager.ChatDisabledUntil = Game.RunTime + order.ExtraData;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case "Chat":
|
||||
{
|
||||
var client = orderManager.LobbyInfo.ClientWithIndex(clientId);
|
||||
|
||||
Reference in New Issue
Block a user