21 lines
649 B
C#
21 lines
649 B
C#
namespace SharpChat.Packet {
|
|
public class WhoisResponsePacket : SockChatTimedS2CPacket {
|
|
private readonly string UserName;
|
|
private readonly string RemoteAddress;
|
|
|
|
public WhoisResponsePacket(string userName, string remoteAddress) {
|
|
UserName = userName;
|
|
RemoteAddress = remoteAddress;
|
|
}
|
|
|
|
public override string Pack() {
|
|
return string.Format(
|
|
"2\t{0}\t-1\t0\fipaddr\f{1}\f{2}\t{3}\t10010",
|
|
TimeStamp.ToUnixTimeSeconds(),
|
|
UserName,
|
|
RemoteAddress,
|
|
MessageId
|
|
);
|
|
}
|
|
}
|
|
}
|