Clean up command perms (#28451)

* Change BanExemption command to AdminFlags.Ban permissions

* Change LOOC to check for Moderator permission

* Change ListVerbs from Admin to Debug AdminFlags

* Change RunVerbAs from Admin to Fun AdminFlags

* More permission changes

* Change GhostKick to Moderator perm

* Clean up command perms

* fuck

---------

Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
This commit is contained in:
Nemanja
2024-06-01 18:01:58 +02:00
committed by null
co-authored by ShadowCommander
parent 61f4441911
commit 19eefe623d
21 changed files with 59 additions and 33 deletions
+8 -3
View File
@@ -13,6 +13,7 @@ using Content.Server.Speech.EntitySystems;
using Content.Server.Station.Components;
using Content.Server.Station.Systems;
using Content.Shared.ActionBlocker;
using Content.Shared.Administration;
using Content.Shared.CCVar;
using Content.Shared.Chat;
using Content.Shared.Database;
@@ -287,9 +288,13 @@ public sealed partial class ChatSystem : SharedChatSystem
message = SanitizeInGameOOCMessage(message);
var sendType = type;
// If dead player LOOC is disabled, unless you are an aghost, send dead messages to dead chat
if (!_adminManager.IsAdmin(player) && !_deadLoocEnabled &&
(HasComp<GhostComponent>(source) || _mobStateSystem.IsDead(source)))
// If dead player LOOC is disabled, unless you are an admin with Moderator perms, send dead messages to dead chat
if ((_adminManager.IsAdmin(player) && _adminManager.HasAdminFlag(player, AdminFlags.Moderator)) // Override if admin
|| _deadLoocEnabled
|| (!HasComp<GhostComponent>(source) && !_mobStateSystem.IsDead(source))) // Check that player is not dead
{
}
else
sendType = InGameOOCChatType.Dead;
// If crit player LOOC is disabled, don't send the message at all.