-
Notifications
You must be signed in to change notification settings - Fork 5
Server query protocol
Transcript of a conversation with BS12's IRC bot developer:
11:09 DopeGhoti: You mentioned that they way you get the server status (mode, players, etc.) is by shooting a query packet at the server and parsing the results. I've been looking everywhere for some documentation on that protocol, but can't seem to find any. I was hoping you'd be willing to share that code, or, failing that, at least point me in the right direction.
11:11 Skibiliano: The packet needs to be structed or something. This is the packet it shoots, '\x00\x83\x00\r\x00\x00\x00\x00\x00?status\x00'
11:14 DopeGhoti: something tells me the response packet isn't just a friendly .py dict or batch of C-style strings, is it?
11:14 Skibiliano: It is actually.
11:14 DopeGhoti: That's.. astonishing
11:15 Skibiliano: version=Baystation+12&mode=extended&respawn=1&enter=1&vote=1&ai=1&host&players=27&admins=1&player1=SortoaThePenguin&player2=Bountylord13&player3=CIB&player4=I-Aryn-I&player5=BlueFishie&player6=Yoshax&player7=Watermelon+Storm&player8=Kemolian&player9=Forsamori&player10=Ispil&player11=Spaceman96&player12=Densane&player13=Chinsky&player14=Anotherlammerperson&player15=Theo1170&player16=Silent_Thunder&
11:15 Skibiliano: Etc. It ends in an &end
11:15 DopeGhoti: Ah, it's a URL-style clod. Brilliant. That's extremely helpful.