Back with another update, I added some error handling code in ReceiveCallback functions, it was assumed recvfrom will never return -1, which could easily happen if someone sent oversized query string to the server, crashing it. Maybe it even solves the crash that sometimes occurs when leaving Join Game menu, although I'm not sure about this one, haven't seen that crash in a while and I don't remember from the last time where in the code it occurs.
I also tweaked the code which processes query strings a bit, originally it was assumed only certain combinations of commands will be sent to the server in certain order, so among other things there was a bug that would result in a crash if the query string began with /secure/ command.
Drakan was one of the earliest games that used GameSpy server query protocol for getting information about the game server itself, when GameSpy predecessor MPlayer also existed. I guess that thing with retrieving the server list from servers.txt file on the master server using plain HTTP protocol was MPlayer thing (also remember MPlayer's master server was the primary followed by the GameSpy), before the special protocol was implemented by GameSpy, which involves connecting to the master server's port 28900 and sending the command to retrieve the list there. I saw in the code that the query command \secure-mp\ is also recognized (assuming mp stands for MPlayer), similar to Gamespy's \secure\ command, used for verifying the server sending the heartbeat packet is real. It uses different encryption key and probably different encryption algorithm.
Today, I also made the server notify the master server when it shut downs after reading that the Gamespy protocol supports that too. Since last two updates, it's now also possible to get Drakan's server to register itself with the master servers run by 333networks. All of these seem to work and can be added to Drakan.cfg:
The last two share the same server database I think. Just the in-game server browser would have to be reworked to support retrieving the server list the proper way. I might look into this again at a later point. There is also the easy way, modifying Luigi Auriemma's gslist utility to output the server list in the text file in the proper format (haven't figured out how to modify the game itself to accept the colons as IP:port separators instead of damn spaces) which the game can read. So you can have a bat file that invokes the utility to get the server list, saves it to servers.txt and starts the game afterwards, achieving similar effect like with that old Drakstart app.
"Once a profound truth has been seen, it cannot be 'unseen'. There's no 'going back' to the person you were. Even if such a possibility did exist... why would you want to?" - Dave Sim