예제 #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;
            }
        }
예제 #2
0
 public SockChatUser(FlashiiAuth auth)
 {
     UserId = auth.UserId;
     ApplyAuth(auth, true);
 }