diff options
author | Ben Harris <ben@tilde.team> | 2020-05-05 21:21:59 -0400 |
---|---|---|
committer | Ben Harris <ben@tilde.team> | 2020-05-05 21:21:59 -0400 |
commit | 2c4e412c189ef54c181ffad96667232eaf80fcef (patch) | |
tree | 76e0f7f6c8803c5e82612c24487dfd932391bce3 /IrcStates/Channel.cs | |
parent | 53da4d4c2a31d939c9ca92345ea935b7502b4e48 (diff) |
Add more tests, ran resharper formatting tool
Diffstat (limited to 'IrcStates/Channel.cs')
-rw-r--r-- | IrcStates/Channel.cs | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/IrcStates/Channel.cs b/IrcStates/Channel.cs index 1850e51..b502f2a 100644 --- a/IrcStates/Channel.cs +++ b/IrcStates/Channel.cs @@ -8,7 +8,7 @@ namespace IrcStates { public string Name { get; set; } public string NameLower { get; set; } - public Dictionary<string, User> Users { get; set; } + public Dictionary<string, ChannelUser> Users { get; set; } public string Topic { get; set; } public string TopicSetter { get; set; } public DateTime TopicTime { get; set; } @@ -23,7 +23,7 @@ namespace IrcStates public void SetName(string name, string nameLower) { - Name = name; + Name = name; NameLower = nameLower; } @@ -31,15 +31,9 @@ namespace IrcStates { if (listMode) { - if (!ListModes.ContainsKey(ch)) - { - ListModes[ch] = new List<string>(); - } + if (!ListModes.ContainsKey(ch)) ListModes[ch] = new List<string>(); - if (ListModes[ch].Contains(param)) - { - ListModes[ch].Add(param ?? string.Empty); - } + if (ListModes[ch].Contains(param)) ListModes[ch].Add(param ?? string.Empty); } else { @@ -54,10 +48,7 @@ namespace IrcStates if (ListModes[ch].Contains(param)) { ListModes[ch].Remove(param); - if (!ListModes[ch].Any()) - { - ListModes.Remove(ch); - } + if (!ListModes[ch].Any()) ListModes.Remove(ch); } } else if (Modes.ContainsKey(ch)) |