2024-05-20 23:40:34 +00:00
|
|
|
|
namespace SharpChat.SockChat.PacketsS2C {
|
2024-05-20 23:00:47 +00:00
|
|
|
|
public class MessageBroadcastS2CPacket : SockChatTimedS2CPacket {
|
2024-05-13 20:55:54 +00:00
|
|
|
|
private readonly string Body;
|
|
|
|
|
|
2024-05-20 23:00:47 +00:00
|
|
|
|
public MessageBroadcastS2CPacket(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
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|