public void ApplyAuth(FlashiiAuth auth, bool invalidateRestrictions = false) { Username = auth.Username; if (IsAway) { Nickname = null; AwayMessage = null; } Colour = new FlashiiColour(auth.ColourRaw); Hierarchy = auth.Hierarchy; IsModerator = auth.IsModerator; CanChangeNick = auth.CanChangeNick; CanCreateChannels = auth.CanCreateChannels; if (invalidateRestrictions || !IsBanned) { BannedUntil = auth.BannedUntil; } if (invalidateRestrictions || !IsSilenced) { SilencedUntil = auth.SilencedUntil; } }
public SockChatUser(FlashiiAuth auth) { UserId = auth.UserId; ApplyAuth(auth, true); }