Fixes and comments

This commit is contained in:
Jordan Brown
2018-07-16 01:23:51 -04:00
parent 2c57a059fa
commit 88d6ff42fb
5 changed files with 22 additions and 7 deletions
BIN
View File
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))
{