about summary refs log blame commit diff
path: root/IrcStates/ChannelUser.cs
blob: fab881cc0a72a799b191cba6f92416b28311ab80 (plain) (tree)
1
2
3
4
5
6
7
8
9
10





                                    



                                       



















                                                               

     
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;
        }
    }
}