I would like to run 1.10 on an internal server. How do I block the listing of other BZflag servers so that my students only see, and thus can only access, our local server?
Don't tell me to change something on my network because I don't have access to my network to make changes. In other words, I need to change the BZflag program. BTW, everything is Windows, including the server.
Thank you.
Shutting Out the Outside World
How does one do that?blast wrote:Well, each client would have to be run with the -nolist paramater.
There must be a simple way to modify the program that does not require a player to set a parameter. Remember...I said this was for use by students. I can't trust high school students to not access other BZflag servers on the Internet.
Remove the "-list" option in bzflag.cxx, change DefaultListServerURL in Protocol.h to an empty string, and make sure that the list server url isn't read from the config file. You will also have to make the "Server" field in the "Join Game" menu uneditable, or your students can just go to http://db.bzflag.org/db/ and copy a server address. And you need to remove the server parameter parsing from bzflag, or the students can go to the same webpage, copy an address and use the command 'bzflag my.copied.bzserver'.
Or, if you don't mind the students seeing the server list but just don't want them to connect to any other server, go to the function joinGame() in playing.cxx (line 5698 in the current CVS version) and add these lines before the rest of the function body:
...with the serverName and serverPort changed to your server name and port, of course.
Code: Select all
strcpy(startupInfo.serverName, "my.bzflag.server");
startupInfo.serverPort = 5154;