sourcebans-pp
sourcebans-pp copied to clipboard
add gametracker support
this adds gametracker display support for servers using the {$server.ip} & {$server.port} variables.
Description
Our community, GamePunch, has our servers listed on GameTracker. We wanted our community members and users to be able to see our server statistics while on SB++.
Motivation and Context
This is an addition/feature request. If possible (I have not done this yet), add an option in admin settings to enable/disable it if you don't have your server listed on GameTracker. However, it works fine as-is, and will work regardless of the server being "claimed" on their site.
How Has This Been Tested?
Testing is fairly simple. GameTracker creates an image based on the server's ip and port. An example of this is as follows (for our jailbreak server):
<a href="https://www.gametracker.com/server_info/74.91.119.5:27015/" target="_blank"><img src="https://cache.gametracker.com/server_info/74.91.119.5:27015/b_560_95_1.png" border="0" width="560" height="95" alt=""/></a>
By removing the IP and Port and replacing it with the variables already in SB++, it makes adding the picture easy.
Screenshots (if appropriate):
With players: here Without players: here
A working copy can be found here
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I have read the CONTRIBUTING document.
The ability to enable/disable this functionality should be added to the admin panel. It should be configurable so people upgrading are not forced to display their GameTracker stats, especially if the server is new and does not have any.