Skip to content

Commit

Permalink
Update IngameChatLogic.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
PunkPun committed Aug 19, 2022
1 parent ed09803 commit 4e73001
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameChatLogic.cs
Expand Up @@ -69,8 +69,10 @@ public IngameChatLogic(Widget widget, OrderManager orderManager, World world, Mo
var teamMessage = modData.Translation.GetString(Team);
var allMessage = modData.Translation.GetString(All);

// Only execute this once, the first time this widget is loaded
if (TextNotificationsManager.MutedPlayers.Count == 0)
orderManager.LobbyInfo.Clients.ForEach((c) => TextNotificationsManager.MutedPlayers.Add(c.Index, false));
foreach (var c in orderManager.LobbyInfo.Clients)
TextNotificationsManager.MutedPlayers.Add(c.Index, false);

tabCompletion.Commands = chatTraits.OfType<ChatCommands>().ToArray().SelectMany(x => x.Commands.Keys);
tabCompletion.Names = orderManager.LobbyInfo.Clients.Select(c => c.Name).Distinct().ToList();
Expand Down

0 comments on commit 4e73001

Please sign in to comment.