about summary refs log tree commit diff
path: root/IRCStates/ChannelUser.cs
diff options
context:
space:
mode:
Diffstat (limited to 'IRCStates/ChannelUser.cs')
-rw-r--r--IRCStates/ChannelUser.cs7
1 files changed, 3 insertions, 4 deletions
diff --git a/IRCStates/ChannelUser.cs b/IRCStates/ChannelUser.cs
index 8c2298b..bc5e99b 100644
--- a/IRCStates/ChannelUser.cs
+++ b/IRCStates/ChannelUser.cs
@@ -9,9 +9,9 @@ namespace IRCStates
             Modes = new List<string>();
         }
 
-        public List<string> Modes { get; set; }
+        public List<string> Modes { get; }
 
-        protected bool Equals(ChannelUser other)
+        private bool Equals(ChannelUser other)
         {
             return other != null && Equals(Modes, other.Modes);
         }
@@ -20,8 +20,7 @@ namespace IRCStates
         {
             if (ReferenceEquals(null, obj)) return false;
             if (ReferenceEquals(this, obj)) return true;
-            if (obj.GetType() != GetType()) return false;
-            return Equals((ChannelUser) obj);
+            return obj.GetType() == GetType() && Equals((ChannelUser) obj);
         }
 
         public override int GetHashCode()