sharp-chat/SharpChat/Packet/UserConnectLogPacket.cs

25 lines
659 B
C#
Raw Normal View History

using System;
namespace SharpChat.Packet {
public class UserConnectLogPacket : SockChatTimedS2CPacket {
private readonly string UserName;
public UserConnectLogPacket(
long messageId,
DateTimeOffset timeStamp,
string userName
) : base(messageId, timeStamp) {
UserName = userName;
}
public override string Pack() {
return string.Format(
"7\t1\t{0}\t-1\tChatBot\tinherit\t\t0\fjoin\f{1}\t{2}\t0\t10010",
TimeStamp.ToUnixTimeSeconds(),
UserName,
MessageId
);
}
}
}