19 lines
559 B
C#
19 lines
559 B
C#
using System;
|
|
|
|
namespace SharpChat.Packet {
|
|
public class MOTDPacket : SockChatTimedS2CPacket {
|
|
private readonly string Body;
|
|
|
|
public MOTDPacket(DateTimeOffset timeStamp, string body) : base(timeStamp) {
|
|
Body = body;
|
|
}
|
|
|
|
public override string Pack() {
|
|
return string.Format(
|
|
"7\t1\t{0}\t-1\tChatBot\tinherit\t\t0\fsay\f{1}\twelcome\t0\t10010",
|
|
TimeStamp.ToUnixTimeSeconds(),
|
|
SockChatUtility.SanitiseMessageBody(Body)
|
|
);
|
|
}
|
|
}
|
|
}
|