banned player list made readonly, lobby fakes support
This commit is contained in:
@@ -24,7 +24,7 @@ namespace Torch.API.Managers
|
||||
/// <summary>
|
||||
/// List of the banned SteamID's
|
||||
/// </summary>
|
||||
List<ulong> BannedPlayers { get; }
|
||||
IReadOnlyList<ulong> BannedPlayers { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the player with the given SteamID is banned.
|
||||
|
@@ -10,8 +10,11 @@ using Torch.Managers;
|
||||
|
||||
namespace Torch.Client.Manager
|
||||
{
|
||||
public class MultiplayerManagerLobby : MultiplayerManagerBase
|
||||
public class MultiplayerManagerLobby : MultiplayerManagerBase, IMultiplayerManagerServer
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public IReadOnlyList<ulong> BannedPlayers => new List<ulong>();
|
||||
|
||||
/// <inheritdoc />
|
||||
public MultiplayerManagerLobby(ITorchBase torch) : base(torch) { }
|
||||
|
||||
@@ -21,6 +24,9 @@ namespace Torch.Client.Manager
|
||||
/// <inheritdoc />
|
||||
public void BanPlayer(ulong steamId, bool banned = true) => Torch.Invoke(() => MyMultiplayer.Static.BanClient(steamId, banned));
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsBanned(ulong steamId) => false;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override void Attach()
|
||||
{
|
||||
|
@@ -32,7 +32,7 @@ namespace Torch.Server.Managers
|
||||
#pragma warning restore 649
|
||||
|
||||
/// <inheritdoc />
|
||||
public List<ulong> BannedPlayers => MySandboxGame.ConfigDedicated.Banned;
|
||||
public IReadOnlyList<ulong> BannedPlayers => MySandboxGame.ConfigDedicated.Banned;
|
||||
|
||||
private Dictionary<ulong, ulong> _gameOwnerIds = new Dictionary<ulong, ulong>();
|
||||
|
||||
|
Reference in New Issue
Block a user