Digital Paint Discussion Board
Development => Bugs, Feature Requests, and Feedback => Topic started by: Burt_Gummer on August 04, 2005, 01:27:05 AM
-
I think it would be cool to have an XML feed of current server stats so that you could put the stats of your server or your clan's server on your website. I already have a plugin for my e107 website that will get the server stats from a ShoutCast server, but I would like to add the stats from my DP server once I get it up and running.
-
Jitspoe ...
I personally have asked for global stats as a matter of fact would offer the web space. Getting it done well.....I can wish at least.
-
BTW, jitspoe, I know I was talking about this last night on IRC, but today I talked to a couple guys they work with, and one, who knows C and C++ pretty well might be able to help me make this possible in build 014.
FYI, just in case I have to tell u first before I modify the source.
-
Your best bet would be to parse the stdlogs. When enabled (sl_logging 1, I think), it will log various events, such as kills/deaths, grabs, caps, name changes, etc. That's how er33t did their stats.
-
But do the stdlogs update in almost real time?
Also, what file directory is this located in?
-
I belive they had to be updated.
-
Yeah, I checked out the file, but the file just keeps getting bigger and bigger and bigger (because new entries to the log get added at the end). Eventually, that would take forever to parse. What I need that file to display is just the Server name, connected users, current map, and maybe even team/player who is winning and their score.
-
No that needs to be a dp gui interface with the maplist, lke game spy offers. My opinion. How big can that file get? I have virtual space or drive space or even web space and the willingness to update.
-
Post removed
-
So if I was going to query one of the current servers, I would use the PHP $fp = fsockopen("udp://217.20.118.15", 22222, $errno, $errstr);
correct? Now the major problem: figuring out how to parse the data.
-
Yup, there's actually two ways to query the server. One just gives the name/player count/map. The other lists all the players and server side variables (can't remember which is which). The game is set up so that some server variables display the score and who's on what team. It should be fairly easy to parse with php. I can't remember what the other one was called. I'd have to look it up.
-
I just need the variable names and I should be able to figure something out.
-
Post removed
-
I think the players are listed after a newline or some character like that.
\pb\!1\pp\!0!2 -- that shows who's on what team, so if your player list were:
joe
jack
jill
1 (jack, since it's 0-based) would be on blue.
0 and 2 (joe and jill) would be purple.
_scores\Purple:2 Blue:1 shows the scores - pretty straightforward.
-
I want stats for EVL servers :(!!!!
-
ok so on my site i want server stats like the Sou site
what code do i use??
-
I have a working adaptation of the SOU server stats script. Check it out on http://www.taloncomputing.us/
BTW, if anyone wants the page and plugin folder to add this to an e107 based site, email me at zjcochran@gmail.com
If you don't have e107, you can get it from http://www.e107.org
For other plugins: http://www.e107coders.org/
For themes: http://www.e107themes.org/
-
Also, in order to use this plugin and e107, you will need to have a server that supports PHP, and have a MySQL database (for e107).
-
I had eR33t's dpstats running on a system using perl/MySQL and PHP to draw the front end. The data could be retrieved from anything that can interface with MySQL(such as the TCL eggdrop we had running in our channels). There was a perl backend stdlog reader that ran every 30 minutes on the two public servers. It wasn't real-time because I liked to have all the data at once for an entire map's play so that more stats could be calculated such as high kill/death/cap/grab counts for each map.
I would distribute the script but it does not function 100%, install easily, configure easily or efficiently buffer MySQL queries and really bogs down most systems.
-
One the Detailed Stats page that is linked to in the menu plugin I wrote, I gave it a javascript to make a popup stats window with a meta tag to make it refresh every second so that it looks like almost live stats.