From 83bada07b596d80b3026deb2fcbaa732a561b8c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sun, 3 Jan 2016 23:10:28 +0100 Subject: [PATCH] don't disconnect every client when one user gets kicked --- OpenRA.Game/GlobalChat.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/OpenRA.Game/GlobalChat.cs b/OpenRA.Game/GlobalChat.cs index 2e25b1d48e..1638210af5 100644 --- a/OpenRA.Game/GlobalChat.cs +++ b/OpenRA.Game/GlobalChat.cs @@ -225,9 +225,17 @@ namespace OpenRA.Chat void OnKick(object sender, KickEventArgs e) { - Disconnect(); - connectionStatus = ChatConnectionStatus.Error; - AddNotification("Error: You were kicked from the chat by {0}".F(e.Who)); + if (e.Whom == client.Nickname) + { + Disconnect(); + connectionStatus = ChatConnectionStatus.Error; + AddNotification("You were kicked from the chat by {0}. ({1})".F(e.Who, e.KickReason)); + } + else + { + Users.Remove(e.Whom); + AddNotification("{0} was kicked from the chat by {1}. ({2})".F(e.Whom, e.Who, e.KickReason)); + } } void OnJoin(object sender, JoinEventArgs e)