IRC parsing, tokenization, and state handling in C#
1namespace IRCStates;
2
3public class User
4{
5 public string NickName { get; private set; }
6 public string NickNameLower { get; private set; }
7
8 public string UserName { get; set; }
9 public string HostName { get; set; }
10 public string RealName { get; set; }
11 public string Account { get; set; }
12 public string Away { get; set; }
13 public HashSet<string> Channels { get; private set; } = [];
14
15 public override string ToString() => $"User(nickname={NickName})";
16
17 public void SetNickName(string nick, string nickLower)
18 {
19 NickName = nick;
20 NickNameLower = nickLower;
21 }
22}