mirror of
https://github.com/WiiLink24/wfc-server.git
synced 2026-08-26 18:44:57 -05:00
QR2: Log client messages
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"wwfc/common"
|
||||
"wwfc/gpcm"
|
||||
"wwfc/logging"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -196,7 +197,16 @@ func SendClientMessage(destIP string, message []byte) {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
logging.Info("QR2", "Sending message")
|
||||
logMsg := ""
|
||||
for i := 0; i < len(message); i++ {
|
||||
if (i % 12) == 0 {
|
||||
logMsg += "\n"
|
||||
}
|
||||
|
||||
logMsg += fmt.Sprintf("%02x ", message[i])
|
||||
}
|
||||
|
||||
logging.Info("QR2", "Sending message:", logMsg)
|
||||
masterConn.WriteTo(payload, destIPAddr)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user