Asay for Meaty Ores

This commit is contained in:
rhailrake
2023-04-28 04:44:00 +06:00
committed by Aviu00
parent 0c17665f7f
commit 07bc0bb754
2 changed files with 6 additions and 3 deletions

View File

@@ -293,13 +293,15 @@ namespace Content.Server.Chat.Managers
private void SendAdminChat(ICommonSession player, string message)
{
if (!_adminManager.IsAdmin(player))
if (!_adminManager.HasAdminFlag(player, AdminFlags.Admin))
{
_adminLogger.Add(LogType.Chat, LogImpact.Extreme, $"{player:Player} attempted to send admin message but was not admin");
return;
}
var clients = _adminManager.ActiveAdmins.Select(p => p.Channel);
var clients = _adminManager.ActiveAdmins
.Where(p => _adminManager.HasAdminFlag(p, AdminFlags.Admin))
.Select(p => p.Channel);
var wrappedMessage = Loc.GetString("chat-manager-send-admin-chat-wrap-message",
("adminChannelName", Loc.GetString("chat-manager-admin-channel-name")),
("playerName", player.Name), ("message", FormattedMessage.EscapeText(message)));

View File

@@ -10,6 +10,7 @@ using Content.Server.Station.Components;
using Content.Server.Station.Systems;
using Content.Server.UtkaIntegration;
using Content.Shared.ActionBlocker;
using Content.Shared.Administration;
using Content.Shared.CCVar;
using Content.Shared.Chat;
using Content.Shared.Database;
@@ -605,7 +606,7 @@ public sealed partial class ChatSystem : SharedChatSystem
{
var name = FormattedMessage.EscapeText(Identity.Name(source, EntityManager));
if (_adminManager.IsAdmin(player))
if (_adminManager.HasAdminFlag(player, AdminFlags.Admin))
{
if (!AdminLoocEnabled)
return;