From 5a4e49a188d059fa5896e63253a90940ee50094d Mon Sep 17 00:00:00 2001 From: mkwcat Date: Sun, 21 Apr 2024 14:23:28 -0400 Subject: [PATCH] GameStats: Add getpd stub --- gamestats/getpd.go | 21 +++++++++++++++++++++ gamestats/main.go | 1 + 2 files changed, 22 insertions(+) create mode 100644 gamestats/getpd.go 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 {