IRC parsing, tokenization, and state handling in C#
at ircrobots 28 lines 784 B view raw
1using System.Collections.Generic; 2 3namespace IRCStates 4{ 5 public class User 6 { 7 public string NickName { get; private set; } 8 public string NickNameLower { get; private set; } 9 10 public string UserName { get; set; } 11 public string HostName { get; set; } 12 public string RealName { get; set; } 13 public string Account { get; set; } 14 public string Away { get; set; } 15 public HashSet<string> Channels { get; private set; } = new HashSet<string>(); 16 17 public override string ToString() 18 { 19 return $"User(nickname={NickName})"; 20 } 21 22 public void SetNickName(string nick, string nickLower) 23 { 24 NickName = nick; 25 NickNameLower = nickLower; 26 } 27 } 28}