Exemplo n.º 1
0
        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;
            }
        }
Exemplo n.º 2
0
 public SockChatUser(FlashiiAuth auth)
 {
     UserId = auth.UserId;
     ApplyAuth(auth, true);
 }