Open bellum128 opened 2 years ago
Can you provide the --debug output? Curious what the info block's reported bot count was.
Sure:
Q#0 Starting
Q#0 Protocol: Valve
Q#0 Options: {
socketTimeout: 2000,
attemptTimeout: 10000,
maxAttempts: 1,
port: 27015,
protocol: 'valve',
requestRules: false,
type: 'garrysmod',
host: 'xxx.xxx.xxx.xxx',
debug: true
}
Q#0 DNS Lookup: xxx.xxx.xxx.xxx
Q#0 Raw IP Address: xxx.xxx.xxx.xxx
Q#0 Requesting info ...
xxx.xxx.xxx.xxx:27015 UDP(48403)-->
Buffer length: 25 bytes
ff ff ff ff 54 53 6f 75 72 63 65 20 45 6e 67 69 6e 65 20 51 75
T S o u r c e E n g i n e Q u
65 72 79 00
e r y
xxx.xxx.xxx.xxx:27015 <--UDP(48403)
Buffer length: 9 bytes
ff ff ff ff 41 53 31 8b 79
A S 1 y
Q#0 Registered RTT: 6ms
Q#0 Received full packet
Q#0 Received 0x41 expected 0x49
Q#0 Received new challenge key: 0x798b3153
Q#0 UDP send finished by callback
xxx.xxx.xxx.xxx:27015 UDP(48403)-->
Buffer length: 29 bytes
ff ff ff ff 54 53 6f 75 72 63 65 20 45 6e 67 69 6e 65 20 51 75
T S o u r c e E n g i n e Q u
65 72 79 00 53 31 8b 79
e r y S 1 y
xxx.xxx.xxx.xxx:27015 <--UDP(48403)
Buffer length: 129 bytes
ff ff ff ff 49 11 5b 54 4b 5a 5d 20 42 75 69 6c 64 20 74 6f 20
I [ T K Z ] B u i l d t o
4b 69 6c 6c 00 67 6d 5f 66 6c 61 74 67 72 61 73 73 00 67 61 72
K i l l g m _ f l a t g r a s s g a r
72 79 73 6d 6f 64 00 53 61 6e 64 62 6f 78 00 a0 0f 04 0d 01 64
r y s m o d S a n d b o x d
6c 00 01 32 30 32 31 2e 31 32 2e 31 35 00 b1 87 69 4c 48 34 00
l 2 0 2 1 . 1 2 . 1 5 i L H 4
00 00 30 01 20 67 6d 3a 73 61 6e 64 62 6f 78 20 67 6d 63 3a 6f
0 g m : s a n d b o x g m c : o
74 68 65 72 20 76 65 72 3a 32 32 30 33 31 37 00 a0 0f 00 00 00
t h e r v e r : 2 2 0 3 1 7
00 00 00
Q#0 Registered RTT: 12ms
Q#0 Received full packet
Q#0 Received 0x49 expected 0x49
Q#0 UDP send finished by callback
Q#0 INFO: {
protocol: 17,
folder: 'garrysmod',
game: 'Sandbox',
appId: 4000,
numplayers: 4,
numbots: 1,
listentype: 'd',
environment: 'l',
secure: 1,
version: '2021.12.15',
steamid: '85568392923465804',
tags: [ ' gm:sandbox gmc:other ver:220317' ]
}
Q#0 Requesting player list ...
xxx.xxx.xxx.xxx:27015 UDP(48403)-->
Buffer length: 9 bytes
ff ff ff ff 55 53 31 8b 79
U S 1 y
xxx.xxx.xxx.xxx:27015 <--UDP(48403)
Buffer length: 95 bytes
ff ff ff ff 44 04 00 c3 83 6c c3 a2 75 73 20 30 63 75 6c 61 74
D l u s 0 c u l a t
75 73 e2 84 a2 00 00 00 00 00 2f 4a da 44 00 47 61 6c 76 61 7a
u s / J D G a l v a z
69 6d 47 58 00 00 00 00 00 63 a3 d2 44 00 53 61 6c 74 20 64 65
i m G X c D S a l t d e
74 65 63 74 69 6e 67 20 53 63 6f 75 74 00 00 00 00 00 ce a5 63
t e c t i n g S c o u t c
44 00 00 00 00 00 00 4b 55 6d 42
D K U m B
Q#0 Registered RTT: 13ms
Q#0 Received full packet
Q#0 Received 0x44 expected 0x44
Q#0 UDP send finished by callback
Q#0 Found player: Ãlâus 0culatus™ 0 1746.3182373046875
Q#0 Found player: GalvazimGX 0 1685.1058349609375
Q#0 Found player: Salt detecting Scout 0 910.5906982421875
Q#0 Found player: 0 59.33329391479492
Q#0 Size of players array: 3
Q#0 Size of bots array: 1
Q#0 Query was successful
{
"name": "[TKZ] Build to Kill",
"map": "gm_flatgrass",
"password": false,
"raw": {
"protocol": 17,
"folder": "garrysmod",
"game": "Sandbox",
"appId": 4000,
"numplayers": 4,
"numbots": 1,
"listentype": "d",
"environment": "l",
"secure": 1,
"version": "2021.12.15",
"steamid": "85568392923465804",
"tags": [
" gm:sandbox gmc:other ver:220317"
]
},
"maxplayers": 13,
"players": [
{
"name": "GalvazimGX",
"raw": {
"score": 0,
"time": 1685.1058349609375
}
},
{
"name": "Salt detecting Scout",
"raw": {
"score": 0,
"time": 910.5906982421875
}
},
{
"name": "",
"raw": {}
}
],
"bots": [
{
"name": "Ãlâus 0culatus™",
"raw": {
"score": 0,
"time": 1746.3182373046875
}
}
],
"connect": "xxx.xxx.xxx.xxx:27015",
"ping": 6
}
A bit of a tough call on that response, since the server is indicating that it currently holds 1 bot and 4 players, then gives us these entries:
Q#0 Found player: Ãlâus 0culatus™ 0 1746.3182373046875
Q#0 Found player: GalvazimGX 0 1685.1058349609375
Q#0 Found player: Salt detecting Scout 0 910.5906982421875
Q#0 Found player: 0 59.33329391479492
The server's count (5 total) doesn't match the player list we've received, and the server sent us a player with no name, which gamedig typically discards as invalid for valve protocol servers. Unfortunately, the valve protocol doesn't tell us /which/ players are bots and which are not, so gamedig has to guess. Typically it assumes the players with the highest online time are the bots, but that obviously isn't the case here. Seems like gmod may possibly be abusing the bot counter to indicate how many of the 4 players are currently connecting, which wouldn't match the behavior of other valve servers :/ Edge cases like this are tough to handle because every game implements the valve protocol spec slightly differently, and of course none of them have good documentation.
Interesting. Here is a snippit with an actual bot spawned in my server. Noting that the bot has data in Raw, and Players have no data in Raw while in the midst of connecting, would it make sense to exclude players from the bot list if their raw data is empty and the game is garrysmod? Since empty Raw seems to be a differentiating factor between bots and connecting humans for Garry's Mod...
Q#0 Size of players array: 4
Q#0 Size of bots array: 1
Q#0 Query was successful
{
"name": "[TKZ] Build to Kill",
"map": "gm_flatgrass",
"password": false,
"raw": {
"protocol": 17,
"folder": "garrysmod",
"game": "Sandbox",
"appId": 4000,
"numplayers": 5,
"numbots": 1,
"listentype": "d",
"environment": "l",
"secure": 1,
"version": "2021.12.15",
"steamid": "85568392923465804",
"tags": [
" gm:sandbox gmc:other ver:220317"
]
},
"maxplayers": 13,
"players": [
{
"name": "Salt detecting Scout",
"raw": {
"score": -7,
"time": 9853.1240234375
}
},
{
"name": "Grey",
"raw": {
"score": -1,
"time": 7250.31884765625
}
},
{
"name": "justin.moyer",
"raw": {
"score": 0,
"time": 6919.1982421875
}
},
{
"name": "CRinge side hopper",
"raw": {
"score": 0,
"time": 3587.1533203125
}
}
],
"bots": [
{
"name": "Bot01",
"raw": {
"score": 0,
"time": 37056.7421875
}
}
],
"connect": "xxx.xxx.xxx.xxx:27015",
"ping": 5
}
Real players are being included in the bot section, seemingly when a new player is joining. As the new player is joining, they are shown in the array with no name or info, as expected for a player in the joining phase, however during this time a random actual player already in the server is erroneously moved to the Bot section.
Below is output JSON array of the issue with names redacted:
"players": [ { "name": "G********X", "raw": { "score": 0, "time": 1685.1058349609375 } }, { "name": "S******************t", "raw": { "score": 0, "time": 910.5906982421875 } }, { "name": "", "raw": {} } ], "bots": [ { "name": "Ã************s™", "raw": { "score": 0, "time": 1746.3182373046875 } } ],