sharp-chat/SharpChat.Protocol.IRC/ClientCommands/AdminCommand.cs

25 lines
800 B
C#
Raw Normal View History

2022-08-30 15:05:29 +00:00
using SharpChat.Protocol.IRC.Replies;
using System;
namespace SharpChat.Protocol.IRC.ClientCommands {
public class AdminCommand : IClientCommand {
public const string NAME = @"ADMIN";
public string CommandName => NAME;
public bool RequireSession => true;
private IRCServer Server { get; }
public AdminCommand(IRCServer server) {
Server = server ?? throw new ArgumentNullException(nameof(server));
}
public void HandleCommand(ClientCommandContext ctx) {
ctx.Connection.SendReply(new AdminMeReply());
ctx.Connection.SendReply(new AdminLocation1Reply());
ctx.Connection.SendReply(new AdminLocation2Reply());
ctx.Connection.SendReply(new AdminEMailReply());
}
}
}