about summary refs log tree commit diff
path: root/IRCStates/ChannelUser.cs
diff options
context:
space:
mode:
authorBen Harris <ben@tilde.team>2020-05-14 23:06:10 -0400
committerBen Harris <ben@tilde.team>2020-05-14 23:17:47 -0400
commit21f1e95fb8e935134a969bc3d729964d8d2aadfa (patch)
treedb2be27e9b5ac48e19f92b56cbad68ab59f7099e /IRCStates/ChannelUser.cs
parent304df7805b9925c2edd992fd4177eef80197f807 (diff)
rename Irc to IRC
Diffstat (limited to 'IRCStates/ChannelUser.cs')
-rw-r--r--IRCStates/ChannelUser.cs32
1 files changed, 32 insertions, 0 deletions
diff --git a/IRCStates/ChannelUser.cs b/IRCStates/ChannelUser.cs
new file mode 100644
index 0000000..8c2298b
--- /dev/null
+++ b/IRCStates/ChannelUser.cs
@@ -0,0 +1,32 @@
+using System.Collections.Generic;
+
+namespace IRCStates
+{
+    public class ChannelUser
+    {
+        public ChannelUser()
+        {
+            Modes = new List<string>();
+        }
+
+        public List<string> Modes { get; set; }
+
+        protected bool Equals(ChannelUser other)
+        {
+            return other != null && Equals(Modes, other.Modes);
+        }
+
+        public override bool Equals(object obj)
+        {
+            if (ReferenceEquals(null, obj)) return false;
+            if (ReferenceEquals(this, obj)) return true;
+            if (obj.GetType() != GetType()) return false;
+            return Equals((ChannelUser) obj);
+        }
+
+        public override int GetHashCode()
+        {
+            return Modes != null ? Modes.GetHashCode() : 0;
+        }
+    }
+}