sharp-chat/SharpChat/Packet/UserChannelLeaveLogPacket.cs

25 lines
680 B
C#

using System;
namespace SharpChat.Packet {
public class UserChannelLeaveLogPacket : ServerPacket {
private readonly long Timestamp;
private readonly string UserName;
public UserChannelLeaveLogPacket(
DateTimeOffset timestamp,
string userName
) {
Timestamp = timestamp.ToUnixTimeSeconds();
UserName = userName;
}
public override string Pack() {
return string.Format(
"7\t1\t{0}\t-1\tChatBot\tinherit\t\t0\flchan\f{1}\t{2}\t0\t10010",
Timestamp,
UserName,
SequenceId
);
}
}
}