sharp-chat/SharpChat.Protocol.IRC/ClientCommands/OperCommand.cs
2022-08-30 17:05:29 +02:00

20 lines
567 B
C#

using SharpChat.Protocol.IRC.Replies;
using System.Linq;
namespace SharpChat.Protocol.IRC.ClientCommands {
public class OperCommand : IClientCommand {
public const string NAME = @"OPER";
public string CommandName => NAME;
public bool RequireSession => true;
public void HandleCommand(ClientCommandContext ctx) {
ctx.Connection.SendReply(
ctx.Arguments.Count() < 2
? new NeedMoreParamsReply(NAME)
: new NoOperatorHostReply()
);
}
}
}