From f42eee638b1372dde5e9454b4cb5dcc33e919943 Mon Sep 17 00:00:00 2001
From: Undid-Iridium <24619207+Undid-Iridium@users.noreply.github.com>
Date: Fri, 30 May 2025 00:35:46 -0400
Subject: [PATCH 1/3] sigh
---
EXILED/Exiled.API/Features/Map.cs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/EXILED/Exiled.API/Features/Map.cs b/EXILED/Exiled.API/Features/Map.cs
index add2a5123b..807b87a453 100644
--- a/EXILED/Exiled.API/Features/Map.cs
+++ b/EXILED/Exiled.API/Features/Map.cs
@@ -117,13 +117,12 @@ public static bool IsDecontaminationEnabled
public static void StaffMessage(string message, Player player = null)
{
player ??= Server.Host;
-
foreach (Player target in Player.List)
{
if (!CommandProcessor.CheckPermissions(target.Sender, PlayerPermissions.AdminChat))
continue;
- player.ReferenceHub.encryptedChannelManager.TrySendMessageToClient(player.NetId + "!" + message, EncryptedChannelManager.EncryptedChannel.AdminChat);
+ target.ReferenceHub.encryptedChannelManager.TrySendMessageToClient(player.NetId + "!" + message, EncryptedChannelManager.EncryptedChannel.AdminChat);
}
}
From a6c9563034b8ebfd33e8b6ab36b6e788337c39bc Mon Sep 17 00:00:00 2001
From: Undid-Iridium <24619207+Undid-Iridium@users.noreply.github.com>
Date: Fri, 30 May 2025 20:25:34 -0400
Subject: [PATCH 2/3] What was really wanted most likely
---
EXILED/Exiled.API/Features/Map.cs | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/EXILED/Exiled.API/Features/Map.cs b/EXILED/Exiled.API/Features/Map.cs
index 807b87a453..04446efb1f 100644
--- a/EXILED/Exiled.API/Features/Map.cs
+++ b/EXILED/Exiled.API/Features/Map.cs
@@ -116,6 +116,16 @@ public static bool IsDecontaminationEnabled
/// The player to send message as, null will use Server Host.
public static void StaffMessage(string message, Player player = null)
{
+ if (player != null)
+ {
+ if (!CommandProcessor.CheckPermissions(player.Sender, PlayerPermissions.AdminChat))
+ {
+ return;
+ }
+
+ player.ReferenceHub.encryptedChannelManager.TrySendMessageToClient(player.NetId + "!" + message, EncryptedChannelManager.EncryptedChannel.AdminChat);
+ }
+
player ??= Server.Host;
foreach (Player target in Player.List)
{
From b9f917240c559bc46a26be9be46fd89fdec19fa5 Mon Sep 17 00:00:00 2001
From: Undid-Iridium <24619207+Undid-Iridium@users.noreply.github.com>
Date: Fri, 30 May 2025 20:26:34 -0400
Subject: [PATCH 3/3] Whoops
---
EXILED/Exiled.API/Features/Map.cs | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/EXILED/Exiled.API/Features/Map.cs b/EXILED/Exiled.API/Features/Map.cs
index 04446efb1f..807b87a453 100644
--- a/EXILED/Exiled.API/Features/Map.cs
+++ b/EXILED/Exiled.API/Features/Map.cs
@@ -116,16 +116,6 @@ public static bool IsDecontaminationEnabled
/// The player to send message as, null will use Server Host.
public static void StaffMessage(string message, Player player = null)
{
- if (player != null)
- {
- if (!CommandProcessor.CheckPermissions(player.Sender, PlayerPermissions.AdminChat))
- {
- return;
- }
-
- player.ReferenceHub.encryptedChannelManager.TrySendMessageToClient(player.NetId + "!" + message, EncryptedChannelManager.EncryptedChannel.AdminChat);
- }
-
player ??= Server.Host;
foreach (Player target in Player.List)
{