コード例 #1
0
 /// <summary>
 /// Creates a new instance of the ChatRoomStatePacketModel class.
 /// </summary>
 /// <param name="packet">The Chat packet</param>
 public ChatRoomStatePacketModel(ChatRawPacketModel packet)
     : base(packet)
 {
     this.EmoteOnly     = packet.GetTagBool("emote-only");
     this.FollowersOnly = packet.GetTagInt("followers-only");
     this.R9K           = packet.GetTagBool("r9k");
     this.Slow          = packet.GetTagInt("slow");
     this.SubsOnly      = packet.GetTagBool("subs-only");
 }
コード例 #2
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");
        }
コード例 #3
0
 /// <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");
 }