34 lines
821 B
C#
34 lines
821 B
C#
using System.Text;
|
|
|
|
namespace SharpChat.Packet {
|
|
public enum ContextClearMode {
|
|
Messages = 0,
|
|
Users = 1,
|
|
Channels = 2,
|
|
MessagesUsers = 3,
|
|
MessagesUsersChannels = 4,
|
|
}
|
|
|
|
public class ContextClearPacket : ServerPacket {
|
|
public ChatChannel Channel { get; private set; }
|
|
public ContextClearMode Mode { get; private set; }
|
|
|
|
public bool IsGlobal
|
|
=> Channel == null;
|
|
|
|
public ContextClearPacket(ChatChannel channel, ContextClearMode mode) {
|
|
Channel = channel;
|
|
Mode = mode;
|
|
}
|
|
|
|
public override string Pack() {
|
|
StringBuilder sb = new();
|
|
|
|
sb.Append('8');
|
|
sb.Append('\t');
|
|
sb.Append((int)Mode);
|
|
|
|
return sb.ToString();
|
|
}
|
|
}
|
|
}
|