/// <summary>
 /// Creates a new instance of the ChatUserStatePacketModel class.
 /// </summary>
 /// <param name="packet">The Chat packet</param>
 public ChatUserPacketModelBase(ChatRawPacketModel packet)
     : base(packet)
 {
     this.UserDisplayName = packet.GetTagString("display-name");
     this.UserBadgeInfo   = packet.GetTagString("badge-info");
     this.UserBadges      = packet.GetTagString("badges");
     this.Color           = packet.GetTagString("color");
 }
 /// <summary>
 /// Creates a new instance of the ChatClearChatPacketModel class.
 /// </summary>
 /// <param name="packet">The Chat packet</param>
 public ChatClearChatPacketModel(ChatRawPacketModel packet)
     : base(packet)
 {
     if (packet.Parameters.Count > 1)
     {
         this.UserLogin = packet.Parameters.Last();
     }
     this.UserID      = packet.GetTagString("target-user-id");
     this.BanDuration = packet.GetTagLong("ban-duration");
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Creates a new instance of the ChatMessagePacketModel class.
        /// </summary>
        /// <param name="packet">The Chat packet</param>
        public ChatMessagePacketModel(ChatRawPacketModel packet)
            : base(packet)
        {
            this.ID      = packet.GetTagString("id");
            this.Message = packet.Get1SkippedParameterText;

            this.UserID          = packet.GetTagString("user-id");
            this.UserLogin       = packet.GetUserLogin;
            this.UserDisplayName = packet.GetTagString("display-name");
            this.UserBadgeInfo   = packet.GetTagString("badge-info");
            this.UserBadges      = packet.GetTagString("badges");
            this.Moderator       = packet.GetTagBool("mod");

            this.Color  = packet.GetTagString("color");
            this.Emotes = packet.GetTagString("emotes");
            this.RoomID = packet.GetTagString("room-id");

            this.Bits = packet.GetTagString("bits");

            this.Timestamp = packet.GetTagString("tmi-sent-ts");
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Creates a new instance of the ChatNoticePacketModel class.
 /// </summary>
 /// <param name="packet">The Chat packet</param>
 public ChatNoticePacketModel(ChatRawPacketModel packet)
     : base(packet)
 {
     this.MessageID = packet.GetTagString("msg-id");
     this.Message   = packet.Get1SkippedParameterText;
 }
 /// <summary>
 /// Creates a new instance of the ChatUserStatePacketModel class.
 /// </summary>
 /// <param name="packet">The Chat packet</param>
 public ChatUserStatePacketModel(ChatRawPacketModel packet)
     : base(packet)
 {
     this.Moderator = packet.GetTagBool("mod");
     this.EmoteSets = packet.GetTagString("emote-sets");
 }