@@ -20,24 +20,6 @@ namespace OpenRA.Network
|
||||
{
|
||||
public const int ChatMessageMaxLength = 2500;
|
||||
|
||||
[FluentReference("player")]
|
||||
const string Joined = "notification-joined";
|
||||
|
||||
[FluentReference("player")]
|
||||
const string Left = "notification-lobby-disconnected";
|
||||
|
||||
[FluentReference]
|
||||
const string GameStarted = "notification-game-has-started";
|
||||
|
||||
[FluentReference]
|
||||
const string GameSaved = "notification-game-saved";
|
||||
|
||||
[FluentReference("player")]
|
||||
const string GamePaused = "notification-game-paused";
|
||||
|
||||
[FluentReference("player")]
|
||||
const string GameUnpaused = "notification-game-unpaused";
|
||||
|
||||
public static int? KickVoteTarget { get; internal set; }
|
||||
|
||||
static Player FindPlayerByClient(this World world, Session.Client c)
|
||||
@@ -78,8 +60,16 @@ namespace OpenRA.Network
|
||||
}
|
||||
|
||||
case "DisableChatEntry":
|
||||
{
|
||||
if (OrderNotFromServerOrWorldIsReplay(clientId, world))
|
||||
{
|
||||
if (OrderNotFromServerOrWorldIsReplay(clientId, world))
|
||||
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;
|
||||
|
||||
// Server may send MaxValue to indicate that it is disabled until further notice
|
||||
@@ -111,6 +101,26 @@ namespace OpenRA.Network
|
||||
break;
|
||||
}
|
||||
|
||||
case "StartKickVote":
|
||||
{
|
||||
if (OrderNotFromServerOrWorldIsReplay(clientId, world))
|
||||
break;
|
||||
|
||||
KickVoteTarget = (int)order.ExtraData;
|
||||
break;
|
||||
}
|
||||
|
||||
case "EndKickVote":
|
||||
{
|
||||
if (OrderNotFromServerOrWorldIsReplay(clientId, world))
|
||||
break;
|
||||
|
||||
if (KickVoteTarget == (int)order.ExtraData)
|
||||
KickVoteTarget = null;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case "Chat":
|
||||
{
|
||||
var client = orderManager.LobbyInfo.ClientWithIndex(clientId);
|
||||
|
||||
Reference in New Issue
Block a user