-=-
Menu
Tournaments
Profile
Poll
Latest videos
Latest comments
Latest matches
flag -t3> [09:08] [CDF]flag
flag -t3> [08:01] [CDF]flag
flag [CDF] [06:05] -t3>flag
flag [CDF] [08:06] -t3>flag
flag [CDF] [08:06] -t3>flag
flag [CDF] [04:04] -t3>flag
flag [CDF] [12:02] CCflag
flag [CDF] [08:07] CCflag
flag -t3> [07:05] [CDF]flag
flag [CDF] [04:04] -t3>flag
Latest forum posts
By: Splat, in: New players wanted » JJ2 related 2021-04-24 10:37
-Sorry for spam. (Posted too much on forums.) ....
By: Splat, in: cheating and admins » Site suggestions 2021-04-05 15:42
It's not always plausible to open JJ2, especially ...
By: MaximuS , in: cheating and admins » Site suggestions 2021-03-25 01:15
I’m so happy that a lot of people feel connected...
By: Splat, in: Watching people drown » Ask Tira 2021-03-24 15:52
This question is about letting people drown in the...
By: Splat, in: cheating and admins » Site suggestions 2021-03-23 13:49
Radar is actually ez 2 maek, just click on the map...
By: Kev, in: cheating and admins » Site suggestions 2021-03-14 19:06
lmao k i hope this is my last comment in this issu...
By: Kev, in: cheating and admins » Site suggestions 2021-03-14 16:06
If gpw rejects the council then thats absolutely l...
By: MasterSven, in: cheating and admins » Site suggestions 2021-03-14 14:25
Basically we had a council like that before and we...
By: cooba, in: cheating and admins » Site suggestions 2021-03-14 01:18
This should have been done 10 years ago.
By: Vivando, in: cheating and admins » Site suggestions 2021-03-13 16:40
I am happy about this change. Mad props to Kev for...
By: Kev, in: cheating and admins » Site suggestions 2021-03-13 13:15
ok some time has passed since i sent the council i...
By: Splat, in: Primetime - Rag vs Splat » Off topic 2021-03-13 00:56
Thanks for making me win, m0ti, however I don't th...
By: Vivando, in: [MULTI] Domination map making contest! » JJ2 related 2021-03-11 23:31
Congratulations to Violet! i-) :goodgame:
By: MaximuS , in: [MULTI] Domination map making contest! » JJ2 related 2021-03-11 20:49
The DOM map making contest has ended with Violet C...
By: Pariah, in: cheating and admins » Site suggestions 2021-03-10 07:22
@cooba: yep.
By: Splat, in: ¿How to play CtF for rabbits? » JJ2 related 2021-03-07 22:58
Q: Jazz Jackrabbit 2's Capture the Flag gamemode i...
By: [GpW]Urbs, in: cheating and admins » Site suggestions 2021-03-07 21:39
I understand why some of our players are pissed, b...
By: cooba, in: cheating and admins » Site suggestions 2021-03-06 16:09
You're a psycho.
By: Pariah, in: cheating and admins » Site suggestions 2021-03-06 04:13
well thanks Kev, i never herd of any of this. i ne...
By: cooba, in: cheating and admins » Site suggestions 2021-03-06 02:14
CX was a mistake
By: MasterSven, in: cheating and admins » Site suggestions 2021-03-05 00:00
I don't think the rules changed that much over the...
By: Vivando, in: cheating and admins » Site suggestions 2021-03-04 22:16
Kev already replied quite thoroughly, but here are...
By: Kev, in: cheating and admins » Site suggestions 2021-03-04 11:58
Let me give you an update on where we are now, bas...
By: Pariah, in: cheating and admins » Site suggestions 2021-03-04 08:05
so where we are now is we have this open wound of ...
By: Lithium, in: What are some of the best maps that never were in mappool? » JJ2 related 2021-03-01 13:28
[quote="DanZeal"]Bannerwatch Base: https://www.jaz...
By: Vivando, in: What are some of the best maps that never were in mappool? » JJ2 related 2021-02-19 16:43
[quote="Kev"]and /c fioctfa by Vivando8D[/quote] ...
By: Kev, in: What are some of the best maps that never were in mappool? » JJ2 related 2021-02-18 22:46
I think its called "an overnight skirmish", a map ...
By: DanZeal, in: What are some of the best maps that never were in mappool? » JJ2 related 2021-02-18 13:55
Bannerwatch Base: https://www.jazz2online.com/down...
By: Splat, in: What are some of the best maps that never were in mappool? » JJ2 related 2021-02-18 13:14
Hollow of the Haunted is a level that after playte...
By: Vivando, in: What are some of the best maps that never were in mappool? » JJ2 related 2021-02-17 20:29
So far: https://www.jazz2online.com/downloads/8100...
By: Splat, in: What are some of the best maps that never were in mappool? » JJ2 related 2021-02-17 19:00
I think there are plenty of them, here are 3: -...
By: MaximuS , in: [MULTI] Domination map making contest! » JJ2 related 2021-01-21 20:36
Update 21.01.21 First, I have to admit that the o...
By: Loon, in: [MULTI] Domination map making contest! » JJ2 related 2021-01-21 08:54
creating a DOM map takes quite a lot of time, espe...
By: Splat, in: [MULTI] Domination map making contest! » JJ2 related 2021-01-18 23:34
Just 2 days until the deadline, any entries?
By: MaximuS , in: [MULTI] Domination map making contest! » JJ2 related 2020-12-13 04:50
Hello! Hi! It’s time for yet another JJnet map ...
By: removed, in: JJ2+ anti-radar discussion » JJ2 related 2020-11-29 20:56
Antiradar is disabled for PNA1 and PNA2 servers.
By: Vivando, in: JJ2+ anti-radar discussion » JJ2 related 2020-11-29 19:47
Okay my bad, I didn't pay attention which server(s...
By: removed, in: JJ2+ anti-radar discussion » JJ2 related 2020-11-29 14:41
[quote]As far as I know, PNAs actually rolled back...
By: Vivando, in: JJ2+ anti-radar discussion » JJ2 related 2020-11-27 18:26
As far as I know, PNAs actually rolled back to Plu...
More...!

JJnet's forum

«Latest posts» «Latest threads» «Search» «User CP»

     ZStats (and [url]) | [q] 2012-07-07 15:37
wKtKavatar
JJnet user

Posts: 707
121
First of all, gj of integrating it in the main site. This really adds to the idea of a reatime ranking emo

Ok, a small suggestion: Make the records based on playername, not on IP.
For example, see ID 405 vs ID 69.

Which brings us to the second suggestion: the forum's tags do not support certain characters in the url, like '+' or '%'.
This makes entering urls with certain PHP/SQL formatted arguments a pain.

Also, the old GIP shown on the right is still vulnerable for the ampersand character '&'. Not much evil cn be done with it, but I thought I'd still tell it.

Thanks, great job on the site sofar.


Nostalgia warning, well, at least if you're one of those ppl...
Replies
Anubis
CC
avatar
JJnet user
Posts: 181
29
#1 | [q]2012-07-07 19:56
The current top player is some Bulgarian o.o
Grytolle
avatar

JJnet admin
Posts: 848
87
#2 | [q]2012-07-07 21:33
Dunno if Jake still reads this forum every now and then. I just copied some code from one of his scripts and tried to make it fit ok in the front page layout emo
Grytolle
avatar

JJnet admin
Posts: 848
87
#3 | [q]2012-07-07 21:36
Code:

function gipke () {
        $r = "\n".'<table border="0" align="center">'."\n".'';
        $connection = fsockopen("list2.digiex.net", 10057, $errno, $errstr, 1);
        if (!$connection) return false;
        $list = ''; //Received data accumulated here
        while (!feof($connection)) $list .= fread($connection, 8192);
        fclose($connection);
        
        $list = str_replace("<", "<", $list);
    $list = str_replace(">", ">", $list);

        $list = nl2br($list);        
        $list = str_replace("   ", " ", $list);
        $list = str_replace("1.24 x", "1.24x", $list);
        $list = str_replace("1.24 s", "1.24s", $list);
        $list = str_replace("1.21 s", "1.21s", $list);
        $list = str_replace("1.20 s", "1.20s", $list);
        $list = str_replace("1.21", "1.23", $list);


        $list = explode("\n", $list);

        $number = count($list) - 1; //always one too much, accordint to cataphract's script
        for ($counter=0; $counter<$number; $counter++) {
                $server = explode(" ",$list[$counter],8);
                $r .=  '<tr>'."\n".'<td>'.sl_remlixo($server[7]emo.'</td>'."\n".''; //name
                if ($server[2] == "private") $r .= '<td><img src="nyckel.png" width="14" height="6" alt="private"/></td>'."\n".''; //private?
                else $r .= "<td> </td>\n";
                $r .=  "<td>".$server[4]."</td>\n"; //versuib
                $r .=  "<td>".str_replace("unknown","?",str_replace("treasure","trs",str_replace("battle","btl",$server[3]emo))."</td>\n"; //type
//                $r .=  "<td>".$server[6]."</td>";//players in server
list($players,$capacity) = explode("/",str_replace(array("[","]"),"",$server[6]emo);
                $r .=  "<td>[".str_pad($players, 2, 0, STR_PAD_LEFT)."/".str_pad($capacity, 2, 0, STR_PAD_LEFT)."]</td>\n";

                $r .=  "</tr>\n";

        }
        return $r."</table>\n";
}


Mby you can figure out a way to fix the script emo
Jake
NF
avatar
JJnet user
Posts: 99
4
#4 | [q]2012-07-08 11:48
It's actually to prevent someone with personal issues to destroy someone else's stats emo
wKtK
avatar

JJnet user
Posts: 707
121
#5 | [q]2012-07-08 12:13
Quote:
It's actually to prevent someone with personal issues to destroy someone else's stats emo


Ah, yes that makes sense. In that case, maybe you could offer users a function that let's them merge results with the same ingame name, but ONLY if they're on the same IP as the result the other record(s) get merged into...


Nostalgia warning, well, at least if you're one of those ppl...
wKtK
avatar

JJnet user
Posts: 707
121
#6 | [q]2012-07-08 12:44
important: remove the underscore from '&_amp;' in these snippets. I had to add it, to prevent the forum from displaying it as a plain '&' character... same goes for '&_lt;' and '&_gt;'.

Ok, I haven't had a chance to test it, seeing as my firewall doesn't seem to like fsockopen making outward connections -_-.
Code:
function gipke () {
                //Write start of table
        $r = "\n".'<table border="0" align="center">'."\n".'';
        /*
         * Open connection. Use the url of the listserver here.
         * Timeout changed from 1 to 2 seconds, to avoid timeouts on lag.
         * If desired, change back to 1 to let the site load a bit faster
         * when the server is experiencing lag.
         * 
         * Addresses to use:
         * list.digiex.net     -  Defaults to a working one?
         * list1.digiex.net    -  The first and main digiex server, back up again.
         * list2.digiex.net    -  Secondary digiex server, seems down atm...
         * Djazz' server       -  Can't find it because his site's down atm. Ask him.
         * list.lun4rsoft.info -  wKtK's expirimental listserver. Not stable atm, don't use yet.
         */
        $connection = fsockopen("list.digiex.net", 10057, $errno, $errstr,2);
        if (!$connection) return false; //Connection failed.
        $list = ''; //Received data accumulated here
        while (!feof($connection)) $list .= fread($connection, 8192); //Read raw data
        fclose($connection);
        
        $list = str_replace("<", "&_lt;", $list);
                $list = str_replace(">", "&_gt;", $list);

        $list = nl2br($list);        
        $list = str_replace("   ", " ", $list);
        $list = str_replace("1.24 x", "1.24x", $list);
        $list = str_replace("1.24 s", "1.24s", $list);
        $list = str_replace("1.21 s", "1.21s", $list);
        $list = str_replace("1.20 s", "1.20s", $list);
        $list = str_replace("1.21", "1.23", $list);


        $list = explode("\n", $list);

        $number = count($list) - 1; //always one too much, according to cataphract's script
        for ($counter=0; $counter<$number; $counter++) {
                $server = explode(" ",$list[$counter],8);
                
                /*
                 * Local fix for ampersands '&' in servernames.
                 * Please read the long comment below this line for a
                 * better solution.
                 */
                $server[7] = str_replace("&","&_amp;",$server[7]emo;
                /*
                 * Below here, the function 'sl_remlixo(String)' gets called.
                 * After some searching, I found this function in a php file
                 * for download on J2O. This function replaces the paragraph sign
                 * and the pipe character ('§' and '|') in servernames.
                 * 
                 * While I provide a local fix here, a better solution would be to
                 * add the following line to the 'sl_remlixo()' function:
                 *                 $v = str_replace("&","&_amp;",$v);
                 * add it just before the return statement, after the replace that
                 * handles the '|' pipe character.
                 * 
                 * I'll also include the fixed sl_remlixo() function.
                 * ~wKtK.
                 */
                $r .=  '<tr>'."\n".'<td>'.sl_remlixo($server[7]emo.'</td>'."\n".''; //name
                
                if ($server[2] == "private") $r .= '<td><img src="nyckel.png" width="14" height="6" alt="private"/></td>'."\n".''; //private?
                else $r .= "<td> </td>\n";
                $r .=  "<td>".$server[4]."</td>\n"; //versuib
                $r .=  "<td>".str_replace("unknown","?",str_replace("treasure","trs",str_replace("battle","btl",$server[3]emo))."</td>\n"; //type
//              $r .=  "<td>".$server[6]."</td>";//players in server
                list($players,$capacity) = explode("/",str_replace(array("[","]"),"",$server[6]emo);
                $r .=  "<td>[".str_pad($players, 2, 0, STR_PAD_LEFT)."/".str_pad($capacity, 2, 0, STR_PAD_LEFT)."]</td>\n";

                $r .=  "</tr>\n";

        }
        return $r."</table>\n";
}



If you choose to update sl_remlixo(), here is the updated version that handles ampersands (Remember, remove the underscore from '&_amp;'):
Code:
function sl_remlixo($v) {
        while (($n = strpos($v,"§")) !== FALSE) { 
                $v = substr($v,0,$n).substr($v,$n +2);
        }
        $v = str_replace("|","",$v);
        $v = str_replace("&","&_amp;",$v);
        return $v;
}



Another site suggestion: fix the codeblock displaying smileys that get copied as 'emo', or & tags getting displayed as the value they represent. not good, not good :p



Nostalgia warning, well, at least if you're one of those ppl...
Grytolle
avatar

JJnet admin
Posts: 848
87
#7 | [q]2012-07-08 12:55
Applied it, seems to work.
(This post has been helpful to 1 of the forumers.)
wKtK
avatar

JJnet user
Posts: 707
121
#8 | [q]2012-07-08 12:56
Glad it works, great to see the GIP back emo


Nostalgia warning, well, at least if you're one of those ppl...
DanZeal
[CDF]
avatar
JJnet admin
Posts: 286
16
#9 | [q]2012-07-08 13:12
The original idea for ZStats was that the code should search for the playername and see if theres a match in usernames on JJ.net and then get the IP from there. If the IP is a match, then the data is saved. If there is no match for the playername, the current system would be used. Since the IP on JJ.net is updated everytime you visit it, you could easily update it and avoid duplicates.


"The myth that women should not lift heavy is advanced only by women who fear effort and men who fear women." -Eric Midkiff
wKtK
avatar

JJnet user
Posts: 707
121
#10 | [q]2012-07-08 13:40
Does it recognise clantags? So in other words, as long as I visit jj.net first it will be fine? any delay before it gets updated?


Nostalgia warning, well, at least if you're one of those ppl...
Jake
NF
avatar
JJnet user
Posts: 99
4
#11 | [q]2012-07-08 14:30
Quote:
maybe you could offer users a function that let's them merge results with the same ingame name, but ONLY if they're on the same IP as the result the other record(s) get merged into...


Nice idea. I could do that at some point.
DanZeal
[CDF]
avatar
JJnet admin
Posts: 286
16
#12 | [q]2012-07-08 14:54
Quote:
Does it recognise clantags? So in other words, as long as I visit jj.net first it will be fine? any delay before it gets updated?


It would, if it ever gets coded. And no delay.


"The myth that women should not lift heavy is advanced only by women who fear effort and men who fear women." -Eric Midkiff
wKtK
avatar

JJnet user
Posts: 707
121
#13 | [q]2012-07-08 16:05
Ah, that explains it. The reason I asked is because I had visited jj.net a few times already on this IP over the course of a few days, before ZStats made a duplicate entry.

So the reason for that is probably that my jj.net username is 'wKtK' and my ingame name is 'aEs wKtK'...


Nostalgia warning, well, at least if you're one of those ppl...
DanZeal
[CDF]
avatar
JJnet admin
Posts: 286
16
#14 | [q]2012-07-08 16:52
Quote:
Ah, that explains it. The reason I asked is because I had visited jj.net a few times already on this IP over the course of a few days, before ZStats made a duplicate entry.

So the reason for that is probably that my jj.net username is 'wKtK' and my ingame name is 'aEs wKtK'...


No, the reason is that this function is NOT coded yet! emo


"The myth that women should not lift heavy is advanced only by women who fear effort and men who fear women." -Eric Midkiff
wKtK
avatar

JJnet user
Posts: 707
121
#15 | [q]2012-07-08 19:29
That's what I meant :p
misunderstandings ftw~


Nostalgia warning, well, at least if you're one of those ppl...
Lithium
aEs
avatar
JJnet user
Posts: 1759
107
#16 | [q]2012-07-08 19:39
ZA becomes more competitive with this, that's good emo


We rode on the winds of the rising storm,
We ran to the sounds of the thunder.
We danced among the lightning bolts,
and tore the world asunder.
wKtK
avatar

JJnet user
Posts: 707
121
#17 | [q]2012-07-09 16:31
From the following name "1&_gt;2&_gt;3" (again, remove the underscores) that should be "1>2>3", it seems that the ampersand values don't get translated to their correct meaning...
I'll look into this.


Nostalgia warning, well, at least if you're one of those ppl...
wKtK
avatar

JJnet user
Posts: 707
121
#18 | [q]2012-07-12 19:32
The GIP seems broken again.

I believe this is because list1.digiex.net is down again, in favour of list2.digiex.net.

If you want, I can write a version of the above code that checks multiple listservers until it finds a working one, like Jazz2 does.
Any demand for this? emo


Nostalgia warning, well, at least if you're one of those ppl...
DanZeal
[CDF]
avatar
JJnet admin
Posts: 286
16
#19 | [q]2012-07-14 17:34
Please do!


"The myth that women should not lift heavy is advanced only by women who fear effort and men who fear women." -Eric Midkiff
wKtK
avatar

JJnet user
Posts: 707
121
#20 | [q]2012-07-15 20:23
Added the functionality to check multiple listservers.

I haven't had a chance to test it yet, due to PHP needing some configuration on my webserver.
If it doesn't work and it's not an easy fix, just show me the output (errors/warnings etc) and I'll fix it emo

http://pastebin.com/bBNyZeJH


Nostalgia warning, well, at least if you're one of those ppl...
wKtK
avatar

JJnet user
Posts: 707
121
#21 | [q]2012-08-01 18:06
Sorry for doublepost, but...

I kinda found a vulnerabillity in zstats. Both the small jj.net widget thingy and the table itself do not escape tags and ampersands.

Explanation? check ZStats: ZStats.
My name has <i><u></u></i> around it, and another entry I tested had <!-- in it.

This should be prevented, I guess... I kept the score of the <!-- one low (~20.1) so it won't interfere much.

PS: Others can do evil, really evil, with <iframe> here. Even infect everyone simply visiting jj.net, so I thought I'd let you know.



Nostalgia warning, well, at least if you're one of those ppl...