-=-
Menu
Tournaments
Profile
Poll
Latest videos
Latest comments
Latest matches
Latest forum posts
By: dinolabis, in: Jetty Banned From JazzJackrabbit » JJ2 related 2022-08-13 01:42
https://www.pukenukem.com/jety/ This is real ?....
By: koulmnballar, in: What have you done to Clippy?! » Off topic 2022-07-20 19:38
[quote]Web Browsing Advisory[/quote] And in the w...
By: koulmnballar, in: What have you done to Clippy?! » Off topic 2022-07-09 23:29
There used to be a paperclip named Clippy, who liv...
By: DanZeal, in: Royal Families of JJ2 » Off topic 2022-07-05 10:46
[quote="Grytolle"][quote="Anubis"]Grytolle and Lee...
By: Grytolle, in: Royal Families of JJ2 » Off topic 2022-06-29 17:11
[quote="Anubis"]Grytolle and Leen both CC[/quote] ...
By: koulmnballar, in: maps 2 inspire UR lvl(s) » Clan talk 2022-06-24 19:24
^ -- East village is actually the pangaean combo ...
By: Toni, in: maps 2 inspire UR lvl(s) » Clan talk 2022-06-23 22:47
The first image looks like something we already ha...
By: Brinko, in: maps 2 inspire UR lvl(s) » Clan talk 2022-06-14 20:11
australia is sus
By: koulmnballar, in: maps 2 inspire UR lvl(s) » Clan talk 2022-06-14 17:49
*** WARNING: IMAGES IN THIS POST COULD B- RESIZED ...
By: qr-s-PL43, in: -How do Egyptian / 1337speak differ? » Clan talk 2022-06-07 01:43
That`s interesting about the [b]"ch"[/b] and [b]"s...
By: Anubis, in: -How do Egyptian / 1337speak differ? » Clan talk 2022-06-04 09:51
This typography is sometimes used in other languag...
By: qr-s-PL43, in: -How do Egyptian / 1337speak differ? » Clan talk 2022-06-03 00:28
-How do Egyptian / 1337speak differ? FYI (for y...
By: qr-s-PL43, in: « ? should esports be illegal in the confederacy ¿ » » Off topic 2022-06-02 17:17
[u][b]«[/b] ? should esports be illegal in the co...
By: Slaz, in: Pointer cursor won't work in JAZZ1 w/o loading WIN31 » JJ2 related 2022-01-04 09:35
Jazz1 is a DOS program and cannot work windowed in...
By: Ashurna, in: -JJ2 lvls thread? » Clan talk 2021-10-14 21:28
cute: so why dont you go tell the robot manager; u...
By: KILLREADYSCORE, in: A beginner's guide to the game: "Jazz Jackrabbit 2" » Forum games 2021-10-14 04:03
[code] A beginner's guide to the game: "Jazz Jack...
By: KILLREADYSCORE, in: Pointer cursor won't work in JAZZ1 w/o loading WIN31 » JJ2 related 2021-10-12 07:45
[i][s][u][b]Pointer cursor won't work in JAZZ1 w/o...
By: KILLREADYSCORE, in: -JJ2 lvls thread? » Clan talk 2021-10-12 06:35
[i]Aside from the obvious maps that are already in...
By: KILLREADYSCORE, in: [MULTI] Domination map making contest! » JJ2 related 2021-10-12 05:55
Simply renaming the gamemode to ANYTHING other tha...
By: Splat, in: . . . jestes _3C_ M'S' » Off topic 2021-10-11 01:21
. . . jestes _3C_ M'S' [i]The year №№ won ...
By: Splat, in: Tertiary school ideas? » Off topic 2021-10-08 13:25
[u]Tertiary school[/u] ideas? ->During [u]posts...
By: Splat, in: Repeat login verification? » Site suggestions 2021-10-08 06:51
-I notice that on this website, there aren't seem...
By: Splat, in: It's about time to start wraping thingz up » Improving rules 2021-10-07 13:53
-For reference, I.M.O., recent versions of the mod...
By: Vivando, in: [MULTI] Domination map making contest! » JJ2 related 2021-10-06 20:53
Violet's entries are now finally added to the DOM ...
By: stijn, in: It's about time to start wraping thingz up » Improving rules 2021-09-07 14:24
Who would be in this next group? If you know C+...
By: Splat, in: It's about time to start wraping thingz up » Improving rules 2021-09-07 08:30
The curent "plus-team" has had [u]almost[/u]_[u]10...
By: Splat, in: JJ2 ladder clan comparisons » Clan talk 2021-08-06 12:54
I would like to attempt to conduct an upvalueing o...
By: Splat, in: Unoriginal team names should be issued infractions » Clan talk 2021-08-06 12:05
"Unoriginal team names should be issued infraction...
By: Slaz, in: JJ2 ladder clan comparisons » Clan talk 2021-07-07 22:17
CDF is still the sexiest clan. :flex:
By: MaximuS , in: JJ2 ladder clan comparisons » Clan talk 2021-06-28 14:05
Best post of 2021 :-D
By: Splat, in: JJ2 needs more strictly moderated servers » JJ2 related 2021-06-27 05:15
The URL below is a link to the Waybackmachine Arch...
By: Splat, in: JJ2 ladder clan comparisons » Clan talk 2021-06-19 04:34
JJ2 ladder clan comparisons =====================...
By: Splat, in: Royal Families of JJ2 » Off topic 2021-06-13 06:28
During the prior decade, I gradually tried to offe...
By: Splat, in: Watching broadcasts while playing CW is cheating » Improving rules 2021-06-13 04:00
That just means the rules are flawed; it should de...
By: SpazTron64, in: Funniest moments! » Forum games 2021-06-10 01:01
Hahaha oh my god, I see some of you have saved som...
By: MasterSven, in: Watching broadcasts while playing CW is cheating » Improving rules 2021-06-06 15:18
Yes during stopped games it could be unethically a...
By: MasterSven, in: Royal Families of JJ2 » Off topic 2021-06-06 15:12
Jenny's parents played JJ2 as well, so JJ2 is cros...
By: Vivando, in: Royal Families of JJ2 » Off topic 2021-06-06 11:44
Indeed Anubis, was gonna say that :D
By: Vivando, in: Watching broadcasts while playing CW is cheating » Improving rules 2021-06-06 11:43
True, unexpected breaks during the game can potent...
By: Anubis, in: Watching broadcasts while playing CW is cheating » Improving rules 2021-06-06 11:30
I did have it open to look at the chat after some ...
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: 186
30
#1 | [q]2012-07-07 19:56
The current top player is some Bulgarian o.o
Grytolle
avatar

JJnet admin
Posts: 849
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: 849
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: 849
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: 287
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: 287
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: 287
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: 287
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...