Limiting access to the server
Hello Tribes next attracted me because of the open source nature of the code, i am not a programmer by trade but i am wondering if the source code available for the tribesNext server could be modified so that only a list of preapproved IP addresses, or ingame names would be able to login to the server. Sort of like a guest list in which only users on the list would be able to join the server. This would be more complex than just putting a password on the server, it would require a successful join to be based on the users IP or ingame name to be included on a list.
Secondly, could the code be modified to export the player stats and game stats at the end of each game?
I tried to message the develoer directly but i am a new member and require at least 3 posts first.
thanks all. ::)
Secondly, could the code be modified to export the player stats and game stats at the end of each game?
I tried to message the develoer directly but i am a new member and require at least 3 posts first.
thanks all. ::)
Comments
rJay
thanks guys.
server.cs... I dug through the script and found the GameConnection::onConnect function, which may or may not aid you in your endeavors.
I'm not too knowledgeable in TS or TGE and its capabilities, nor Tribes 2's best places to handle these instances. Just going of of something remotely close to what I've been told.
You could probably handle this using a client's guid through %client.guid.
You're better off receiving a response from Blakhart, Phantom, Liukcairo, Thyth, teratos, etc.
Threw this together in about 2 minutes, so it may not work as intended, but this is how you'd do something of that nature.
You'll probably want to parent::onConnect after all the code to check approved IP addresses, there's not really a reason to let that run first if you're just checking IP addresses.
Speaking of that, the correct message function is setDisconnectReason, not setDisconnectMessage.
I had to re-implement bans when building the TribesNext version of the game server connection process, so the code for processing GUID/IP bans is in script source (within t2csri.vl2, which is just a .zip file, containing the TribesNext script code). The quick and dirty way would be to invert the ban list check, and use the ban list facilities as your whitelist.
If you want to be more clever about it, you could use the web-based clan/profile API and restrict access to your server to those who have membership in your whitelist clan. If you want to be really clever about it, you could allow players to join, but not let them out of observer mode (possibly hide their chat messages from non-server-admin players), and give them instructions for whitelisting.
But, if you're not capable of programming, the easiest way really would just be setting a periodically rotating server password.
Regarding game stats, there are a bunch of different script packages that do different kinds of statistics collection and reporting. Teratos has some pretty nice scripts that he'd connected up to a web based player statistics viewer when the Goon Haven server was up -- you can probably find a copy by searching on the forum here.