about summary refs log tree commit diff
path: root/IrcStates/Channel.cs
diff options
context:
space:
mode:
authorBen Harris <ben@tilde.team>2020-05-05 21:21:59 -0400
committerBen Harris <ben@tilde.team>2020-05-05 21:21:59 -0400
commit2c4e412c189ef54c181ffad96667232eaf80fcef (patch)
tree76e0f7f6c8803c5e82612c24487dfd932391bce3 /IrcStates/Channel.cs
parent53da4d4c2a31d939c9ca92345ea935b7502b4e48 (diff)
Add more tests, ran resharper formatting tool
Diffstat (limited to 'IrcStates/Channel.cs')
-rw-r--r--IrcStates/Channel.cs19
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))