mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-30 16:39:21 +01:00
Fixes and comments
This commit is contained in:
Binary file not shown.
@@ -1,14 +1,29 @@
|
||||
namespace Tgstation.Server.Host.Components.Chat
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a <see cref="Providers.IProvider"/> channel
|
||||
/// </summary>
|
||||
public sealed class Channel
|
||||
{
|
||||
/// <summary>
|
||||
/// The <see cref="Providers.IProvider"/> channel Id.
|
||||
/// </summary>
|
||||
/// <remarks><see cref="Chat"/> remaps this to an internal id using <see cref="ChannelMapping"/></remarks>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The user friendly name of the <see cref="Channel"/>
|
||||
/// </summary>
|
||||
public string FriendlyName { get; set; }
|
||||
|
||||
public string ConnectionName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If this is considered a channel for admin commands
|
||||
/// </summary>
|
||||
public bool IsAdminChannel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If this i
|
||||
/// </summary>
|
||||
public bool IsPrivateChannel { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
namespace Tgstation.Server.Host.Components.Chat.Commands
|
||||
{
|
||||
abstract class Command
|
||||
{
|
||||
public abstract class Command
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string HelpText { get; set; }
|
||||
public bool AdminOnly { get; set; }
|
||||
|
||||
public abstract void Invoke(string arguments);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace Tgstation.Server.Host.Components.Chat.Commands
|
||||
{
|
||||
sealed class CustomCommand : Command
|
||||
public sealed class CustomCommand : Command
|
||||
{
|
||||
ICustomCommandHandler handler;
|
||||
|
||||
|
||||
@@ -556,7 +556,7 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<string> HandleChatCommand(string commandName, IEnumerable<string> arguments, Chat.User sender, CancellationToken cancellationToken)
|
||||
public async Task<string> HandleChatCommand(string commandName, string arguments, Chat.User sender, CancellationToken cancellationToken)
|
||||
{
|
||||
using (await SemaphoreSlimContext.Lock(semaphore, cancellationToken).ConfigureAwait(false))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user