ircsharp/IRCStates/ChannelUser.cs

27 lines
683 B
C#
Raw Normal View History

using System.Collections.Generic;
2020-05-15 03:06:10 +00:00
namespace IRCStates
{
public class ChannelUser
{
2023-11-07 22:54:58 +00:00
public List<string> Modes { get; } = new List<string>();
2020-05-14 06:10:04 +00:00
2020-05-17 02:08:40 +00:00
private bool Equals(ChannelUser other)
2020-05-14 06:10:04 +00:00
{
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;
2020-05-17 02:08:40 +00:00
return obj.GetType() == GetType() && Equals((ChannelUser) obj);
2020-05-14 06:10:04 +00:00
}
public override int GetHashCode()
{
return Modes != null ? Modes.GetHashCode() : 0;
}
}
}