sharp-chat/SharpChat/Packet/ChannelCreatePacket.cs

25 lines
687 B
C#
Raw Normal View History

2022-08-30 15:00:58 +00:00
using System.Collections.Generic;
using System.Text;
namespace SharpChat.Packet {
public class ChannelCreatePacket : ServerPacket {
public ChatChannel Channel { get; private set; }
public ChannelCreatePacket(ChatChannel channel) {
Channel = channel;
}
public override IEnumerable<string> Pack() {
StringBuilder sb = new StringBuilder();
sb.Append((int)SockChatServerPacket.ChannelEvent);
sb.Append('\t');
sb.Append((int)SockChatServerChannelPacket.Create);
sb.Append('\t');
sb.Append(Channel.Pack());
yield return sb.ToString();
}
}
}