GameStats: Add getpd stub

This commit is contained in:
mkwcat 2024-04-21 14:23:28 -04:00
parent 8f964bb213
commit 5a4e49a188
No known key found for this signature in database
GPG Key ID: 7A505679CE9E7AA9
2 changed files with 22 additions and 0 deletions

21
gamestats/getpd.go Normal file
View File

@ -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": `\\`,
},
})
}

View File

@ -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 {