Tremulous Forum

General => General Discussion => Topic started by: rasz_pl on September 11, 2006, 09:35:36 pm

Title: vsp stats processor
Post by: rasz_pl on September 11, 2006, 09:35:36 pm
http://www.5th-gradient.com/vsp/

anyone up to the challenge of making a trem profile for vsp?
I would try, but for me this :

class VSPParserQ3A { var $V93da65a9; var $V21d8a920; var
$Vae2aeb93; var $Va2bbabfe; var $V6d2b5d2c;
 var $V42dfa3a4; var $Vc3ecd549; var $V9693e947; var $Vdafa753c; var $V50dffd37; var $Vd6d33a32;
var $logdata; var $Va733fe6b; var $Vb3b1075a; function VSPParserQ3A($Ve0d85fdc,&$V4f00ff2f,&$V495c39bf)
 { define("C7e731e80",1024); $this->Fcda1c5ae($Ve0d85fdc); $this->V21d8a920= $V4f00ff2f; $this->Vae2aeb93= $V495c39bf;
 $this->V6d2b5d2c= array(); $this->V42dfa3a4= array(); $this->Va2bbabfe= array(); $this->logdata=array();
 $this->Vdafa753c= false; $this->V42dfa3a4['weapon_name']['search'] =array( "/MOD_/" ,"/_SPLASH/"

looks like a marauder vomit :( and their forum is currently offline.
Title: vsp stats processor
Post by: Stof on September 11, 2006, 09:51:47 pm
This looks like the result of an obfuscated code contest, but without any kind of style :eek: This MUST be some PHP or some Perl.
Title: vsp stats processor
Post by: David on September 11, 2006, 10:04:50 pm
Quote from: "rasz_pl"

Code: [Select]

class VSPParserQ3A
{
    var $V93da65a9;
    var $V21d8a920;
    var $Vae2aeb93;
    var $Va2bbabfe;
    var $V6d2b5d2c;
    var $V42dfa3a4;
    var $Vc3ecd549;
    var $V9693e947;
    var $Vdafa753c;
    var $V50dffd37;
    var $Vd6d33a32;
    var $logdata;
    var $Va733fe6b;
    var $Vb3b1075a;
   
    function VSPParserQ3A($Ve0d85fdc,&$V4f00ff2f,&$V495c39bf)
    {
        define("C7e731e80",1024);
        $this->Fcda1c5ae($Ve0d85fdc);
        $this->V21d8a920= $V4f00ff2f;
        $this->Vae2aeb93= $V495c39bf;
        $this->V6d2b5d2c= array();
        $this->V42dfa3a4= array();
        $this->Va2bbabfe= array();
        $this->logdata=array();
        $this->Vdafa753c= false;    
        $this->V42dfa3a4['weapon_name']['search'] =array( "/MOD_/" ,"/_SPLASH/"



What the hell is all this?
Title: vsp stats processor
Post by: Undeference on September 12, 2006, 03:47:15 am
That's certainly one way to prevent someone from stealing your precious source code: make it so uselessly obfuscated that no one wants it. It is indeed PHP. And they said that PHP code is inherently cleaner more mantainable than Perl code...

I don't think I have anything that will automatically reformat PHP files.
Title: vsp stats processor
Post by: David on September 12, 2006, 12:07:56 pm
s/;/;\n/ does wonders to readability.
Title: vsp stats processor
Post by: rasz_pl on September 12, 2006, 12:09:17 pm
there are parsers for :
                          cod              Call Of Duty, United Offensive    
                           hl               HalfLife 1 & 2, CS:Source etc.    
                           moh              Medal Of Honor AA,SH,BT,PA? etc.  
                           q3a              Quake 3 Arena                      
                           q3a-battle       Quake 3 Arena BattleMod            
                           q3a-cpma         Quake 3 Arena CPMA (Promode)      
                           q3a-freeze       Quake 3 Arena (U)FreezeTag etc.    
                           q3a-lrctf        Quake 3 Arena Lokis Revenge CTF    
                           q3a-osp          Quake 3 Arena OSP                  
                           q3a-ra3          Quake 3 Arena Rocket Arena 3      
                           q3a-threewave    Quake 3 Arena Threewave            
                           q3a-ut           Quake 3 Arena UrbanTerror          
                           q3a-xp           Quake 3 Arena Excessive Plus      
                           rtcw             Return to Castle Wolfenstein      
                           sof2             Soldier of Fortune 2              
                           wet              Wolfenstein: Enemy Territory  

but sadly, they all look like a vomit :(.

ok, the other one with a source is http://idda.planetquake.gamespy.com/
I'll try to compile it in a sec.
Title: vsp stats processor
Post by: Undeference on September 12, 2006, 03:08:12 pm
Quote from: "David"
s/;/;\n/ does wonders to readability.
And what about all the other junk?
s/}(?!\n| ?else)/}\n/
And then I'd have to go through manually indenting everything to get a better idea of scope? Yuck! Then there are the cryptic variable, class, and function names... I pass!
Title: vsp stats processor
Post by: Chojin on September 12, 2006, 06:48:46 pm
wow, that is sick!
Title: vsp stats processor
Post by: next_ghost on September 12, 2006, 07:11:28 pm
Quote from: "Undeference"
Quote from: "David"
s/;/;\n/ does wonders to readability.
And what about all the other junk?
s/}(?!\n| ?else)/}\n/
And then I'd have to go through manually indenting everything to get a better idea of scope? Yuck! Then there are the cryptic variable, class, and function names... I pass!


AWK can do wonders to indenting :)
Title: vsp stats processor
Post by: vcxzet on September 12, 2006, 07:54:52 pm
[]D [] []\/[] []D [] []\[]
Title: vsp stats processor
Post by: kevlarman on September 13, 2006, 02:22:30 am
Quote from: "next_ghost"
Quote from: "Undeference"
Quote from: "David"
s/;/;\n/ does wonders to readability.
And what about all the other junk?
s/}(?!\n| ?else)/}\n/
And then I'd have to go through manually indenting everything to get a better idea of scope? Yuck! Then there are the cryptic variable, class, and function names... I pass!


AWK can do wonders to indenting :)
or emacs *ducks*
Title: vsp stats processor
Post by: squishy on September 13, 2006, 03:37:28 am
I've begun working on a stats tool for my server. It's still being tweaked, but thought I'd share.

Only thing I don't like is that the stats are logged by username, so players can have multiple names logged in the stats tool. This should be easier to clean up when GUIDs are implemented globally. For now, I added a search tool so players could search for their names and get a tally.

My game server is Win2k3, so I poll the games.log, parse it with a VBS script, and import data into a MySQL db. I then push the MySQL db to my Web host for display on my site.

http://trem.b-tch.com/stats.php
Title: vsp stats processor
Post by: err on September 13, 2006, 04:21:04 am
Quote from: "digifad"

http://trem.b-tch.com/stats.php


Now that's some cool stuff. My only suggestion is a way to search kills / deaths AND choose your sort - there is no way to get to this page using the form / links... http://trem.b-tch.com/stats.php?s=2&k=stk

:edit: how exactly are you calculating rank btw? percentage*n1 + kills*n2 or something? just curious....
Title: vsp stats processor
Post by: squishy on September 13, 2006, 05:15:22 pm
Thanks for pointing that out, err. I tried to make sure I had all the queries included in the paging and sorting links, but must have missed that one. I'll fix that soon.

At the moment, rank is calculated by "kills-deaths". This ensures that someone with a 4-0 record is not on top with 100% ratio. I'm looking for a better calculation for rank, but have yet to find a good one.

It is still a work in progress, so input is appreciated.