2024-05-20 02:16:38 +00:00
|
|
|
|
namespace SharpChat.Packet {
|
|
|
|
|
public class MessageBroadcastPacket : SockChatTimedS2CPacket {
|
2024-05-13 20:55:54 +00:00
|
|
|
|
private readonly string Body;
|
|
|
|
|
|
2024-05-14 22:17:25 +00:00
|
|
|
|
public MessageBroadcastPacket(string body) {
|
2024-05-13 20:55:54 +00:00
|
|
|
|
Body = body;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override string Pack() {
|
|
|
|
|
return string.Format(
|
|
|
|
|
"2\t{0}\t-1\t0\fsay\f{1}\t{2}\t10010",
|
2024-05-20 02:16:38 +00:00
|
|
|
|
TimeStamp.ToUnixTimeSeconds(),
|
2024-05-19 21:02:17 +00:00
|
|
|
|
SockChatUtility.SanitiseMessageBody(Body),
|
2024-05-20 02:16:38 +00:00
|
|
|
|
MessageId
|
2024-05-13 20:55:54 +00:00
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|