sharp-chat/SharpChat/Packet/UserNotFoundErrorPacket.cs

17 lines
522 B
C#

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