From 0e3de710367492171762aaecb228cd5a9e934e43 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Thu, 12 Oct 2017 20:05:13 +0100 Subject: [PATCH] Add line limit to global chat. --- OpenRA.Mods.Common/Widgets/Logic/GlobalChatLogic.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OpenRA.Mods.Common/Widgets/Logic/GlobalChatLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/GlobalChatLogic.cs index 04b4f4e7ec..ed89be3f32 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/GlobalChatLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/GlobalChatLogic.cs @@ -42,6 +42,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic inputBox.IsDisabled = () => Game.GlobalChat.ConnectionStatus != ChatConnectionStatus.Joined; inputBox.OnEnterKey = EnterPressed; + // IRC protocol limits messages to 510 characters + CRLF + inputBox.MaxLength = 510; + var nickName = Game.GlobalChat.SanitizedName(Game.Settings.Player.Name); var nicknameBox = widget.Get("NICKNAME_TEXTFIELD"); nicknameBox.Text = nickName;