sharp-chat/SharpChat/Packet/ChannelCreatePacket.cs

18 lines
509 B
C#

namespace SharpChat.Packet {
public class ChannelCreatePacket : ServerPacket {
public ChatChannel Channel { get; private set; }
public ChannelCreatePacket(ChatChannel channel) {
Channel = channel;
}
public override string Pack() {
return string.Format(
"4\t0\t{0}\t{1}\t{2}",
Channel.Name,
Channel.HasPassword ? 1 : 0,
Channel.IsTemporary ? 1 : 0
);
}
}
}