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