using System;
using System.Collections.Generic;
using System.Text;

namespace SharpChat.Packet {
    public class UserChannelForceJoinPacket(ChatChannel channel) : ServerPacket {
        public ChatChannel Channel { get; private set; } = channel ?? throw new ArgumentNullException(nameof(channel));

        public override IEnumerable<string> Pack() {
            StringBuilder sb = new();

            sb.Append('5');
            sb.Append('\t');
            sb.Append('2');
            sb.Append('\t');
            sb.Append(Channel.Name);

            yield return sb.ToString();
        }
    }
}