sharp-chat/SharpChat.Protocol.IRC/ServerCommands/ServerJoinCommand.cs

25 lines
738 B
C#
Raw Normal View History

2022-08-30 15:05:29 +00:00
using SharpChat.Channels;
using SharpChat.Protocol.IRC.Channels;
using SharpChat.Users;
using System;
namespace SharpChat.Protocol.IRC.ServerCommands {
public class ServerJoinCommand : ServerCommand {
public const string NAME = @"JOIN";
public override string CommandName => NAME;
public override IUser Sender { get; }
private IChannel Channel { get; }
public ServerJoinCommand(IChannel channel, IUser user) {
Channel = channel ?? throw new ArgumentNullException(nameof(channel));
Sender = user ?? throw new ArgumentNullException(nameof(user));
}
protected override string BuildLine() {
return Channel.GetIRCName();
}
}
}