2024-05-14 22:56:56 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
2024-05-20 23:00:47 +00:00
|
|
|
|
namespace SharpChat.PacketsS2C {
|
|
|
|
|
public class UserConnectLogS2CPacket : SockChatTimedS2CPacket {
|
2024-05-14 22:56:56 +00:00
|
|
|
|
private readonly string UserName;
|
|
|
|
|
|
2024-05-20 23:00:47 +00:00
|
|
|
|
public UserConnectLogS2CPacket(
|
2024-05-20 02:16:38 +00:00
|
|
|
|
long messageId,
|
|
|
|
|
DateTimeOffset timeStamp,
|
2024-05-14 22:56:56 +00:00
|
|
|
|
string userName
|
2024-05-20 02:16:38 +00:00
|
|
|
|
) : base(messageId, timeStamp) {
|
2024-05-14 22:56:56 +00:00
|
|
|
|
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",
|
2024-05-20 02:16:38 +00:00
|
|
|
|
TimeStamp.ToUnixTimeSeconds(),
|
2024-05-14 22:56:56 +00:00
|
|
|
|
UserName,
|
2024-05-20 02:16:38 +00:00
|
|
|
|
MessageId
|
2024-05-14 22:56:56 +00:00
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|