diff --git a/gamestats/getpd.go b/gamestats/getpd.go new file mode 100644 index 0000000..944a683 --- /dev/null +++ b/gamestats/getpd.go @@ -0,0 +1,21 @@ +package gamestats + +import ( + "strconv" + "time" + "wwfc/common" +) + +func (g *GameStatsSession) getpd(command common.GameSpyCommand) { + g.Write(common.GameSpyCommand{ + Command: "getpdr", + CommandValue: "1", + OtherValues: map[string]string{ + "lid": strconv.Itoa(g.LoginID), + "pid": command.OtherValues["pid"], + "mod": strconv.Itoa(int(time.Now().Unix())), + "length": "0", + "data": `\\`, + }, + }) +} diff --git a/gamestats/main.go b/gamestats/main.go index a0d384d..896107e 100644 --- a/gamestats/main.go +++ b/gamestats/main.go @@ -156,6 +156,7 @@ func handleRequest(conn net.Conn) { return } + commands = session.handleCommand("getpd", commands, session.getpd) commands = session.handleCommand("setpd", commands, session.setpd) for _, command := range commands {