sharp-chat/SharpChat.Protocol.IRC/Replies/UserModeIsReply.cs

24 lines
627 B
C#
Raw Normal View History

2022-08-30 15:05:29 +00:00
using SharpChat.Protocol.IRC.Users;
using SharpChat.Users;
using System;
namespace SharpChat.Protocol.IRC.Replies {
public class UserModeIsReply : Reply {
public const int CODE = 221;
public override int ReplyCode => CODE;
private IUser User { get; }
private bool IsSecure { get; }
public UserModeIsReply(IUser user, bool isSecure) {
User = user ?? throw new ArgumentNullException(nameof(user));
IsSecure = isSecure;
}
protected override string BuildLine() {
return '+' + User.GetIRCModeString(IsSecure);
}
}
}