IW4M-Admin/SharedLibraryCore/Dtos/Meta/Responses/UpdatedAliasResponse.cs
RaidMax a4a65a486a update GenerateGuidFromString to resolve to a stable hash code.
fix bots not showing up on live radar
2020-09-21 15:30:42 -05:00

21 lines
596 B
C#

namespace SharedLibraryCore.Dtos.Meta.Responses
{
public class UpdatedAliasResponse : BaseMetaResponse
{
public string Name { get; set; }
public string IPAddress { get; set; } = "--";
public override bool Equals(object obj)
{
if (obj is UpdatedAliasResponse resp)
{
return resp.Name.StripColors() == Name.StripColors() && resp.IPAddress == IPAddress;
}
return false;
}
public override int GetHashCode() => $"{Name.StripColors()}{IPAddress}".GetStableHashCode();
}
}