ConGroups are gone. Long live admin flags in content.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Content.Server.Administration;
|
||||
using Content.Server.GameObjects.Components.GUI;
|
||||
using Content.Server.GameObjects.Components.Items.Storage;
|
||||
using Content.Server.GameObjects.Components.Observer;
|
||||
@@ -8,6 +9,7 @@ using Content.Server.Interfaces.GameObjects;
|
||||
using Content.Server.Observer;
|
||||
using Content.Server.Players;
|
||||
using Content.Server.Utility;
|
||||
using Content.Shared.Administration;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.GameObjects.Components.Damage;
|
||||
using Content.Shared.Interfaces;
|
||||
@@ -20,6 +22,7 @@ using Robust.Shared.Localization;
|
||||
|
||||
namespace Content.Server.Chat
|
||||
{
|
||||
[AnyCommand]
|
||||
internal class SayCommand : IClientCommand
|
||||
{
|
||||
public string Command => "say";
|
||||
@@ -51,6 +54,7 @@ namespace Content.Server.Chat
|
||||
}
|
||||
}
|
||||
|
||||
[AnyCommand]
|
||||
internal class MeCommand : IClientCommand
|
||||
{
|
||||
public string Command => "me";
|
||||
@@ -76,6 +80,7 @@ namespace Content.Server.Chat
|
||||
}
|
||||
}
|
||||
|
||||
[AnyCommand]
|
||||
internal class OOCCommand : IClientCommand
|
||||
{
|
||||
public string Command => "ooc";
|
||||
@@ -96,6 +101,7 @@ namespace Content.Server.Chat
|
||||
}
|
||||
}
|
||||
|
||||
[AdminCommand(AdminFlags.Admin)]
|
||||
internal class AdminChatCommand : IClientCommand
|
||||
{
|
||||
public string Command => "asay";
|
||||
@@ -116,6 +122,7 @@ namespace Content.Server.Chat
|
||||
}
|
||||
}
|
||||
|
||||
[AnyCommand]
|
||||
internal class SuicideCommand : IClientCommand
|
||||
{
|
||||
public string Command => "suicide";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Content.Server.GameObjects.Components;
|
||||
using Content.Server.Administration;
|
||||
using Content.Server.GameObjects.Components.GUI;
|
||||
using Content.Server.GameObjects.Components.Headset;
|
||||
using Content.Server.GameObjects.Components.Items.Storage;
|
||||
@@ -12,7 +12,6 @@ using Content.Shared.Chat;
|
||||
using Content.Shared.GameObjects.Components.Inventory;
|
||||
using Content.Shared.GameObjects.EntitySystems;
|
||||
using Content.Shared.Interfaces;
|
||||
using Robust.Server.Console;
|
||||
using Robust.Server.Interfaces.GameObjects;
|
||||
using Robust.Server.Interfaces.Player;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
@@ -47,7 +46,7 @@ namespace Content.Server.Chat
|
||||
[Dependency] private readonly IServerNetManager _netManager = default!;
|
||||
[Dependency] private readonly IPlayerManager _playerManager = default!;
|
||||
[Dependency] private readonly IMoMMILink _mommiLink = default!;
|
||||
[Dependency] private readonly IConGroupController _conGroupController = default!;
|
||||
[Dependency] private readonly IAdminManager _adminManager = default!;
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
@@ -231,12 +230,7 @@ namespace Content.Server.Chat
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_conGroupController.CanCommand(player, "asay"))
|
||||
{
|
||||
SendOOC(player, message);
|
||||
return;
|
||||
}
|
||||
var clients = _playerManager.GetPlayersBy(x => _conGroupController.CanCommand(x, "asay")).Select(p => p.ConnectedClient);;
|
||||
var clients = _adminManager.ActiveAdmins.Select(p => p.ConnectedClient);
|
||||
|
||||
var msg = _netManager.CreateNetMessage<MsgChatMessage>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user