The online racing simulator
Searching in All forums
(7 results)
mr Orange
S2 licensed
Quote from Victor :If no join links work at all, there's something wrongly setup maybe? Perhaps you need to update your join-utility to the latest? http://lfstools.crazyice.net/p ... php?action=file&id=57
Wouldn't know otherwise why it doesn't work in firefox. I haven't met anyone else having that problem I think

Additionally, I just tested hostnames with the '|' character in them, they work without any additional encoding in IE. I'm really thinking you haven' tinstalled the latest join-utility now?

Thanks. I apologise, I should have tested a new join-version first. I used the original LFSJoin, maybe it ran out of date or got corrupted when I installed the new FF. Join2LFS works perfect.

Is there a reason you replaced all " " with "%20" on lfsworld.net for IE? As it seams Join2LFS works fine without.

For those interested: urlencode for FF seems to be necessary, else with a host like "ATC Team Public #1" the last space between Public and #1 gets lost.
mr Orange
S2 licensed
Quote from Victor :to be completely precise - the urlencoding of the LFS:// url only has to be done for browsers other than IE. IE in turn needs only the '+' sign converted DOUBLE (to my knowledge there are no other characters that need conversion, but maybe there are - i haven't met any yet).

So:

IE:
$hostname = preg_replace ("'\+'", "%252B", $hostname);

ANY OTHER BROWSER:
$hostname = urlencode ($hostname);

I am a bit confused at encoding the right LFS join path...
I wanted to use this like in the quote above:


<?php 
function urlhost($hostname){
    if (
stristr($_SERVER['HTTP_USER_AGENT'], 'MSIE')){ 
        
// IE
        
$hostname preg_replace ("'\+'""%252B"$hostname);
        return 
$hostname;
    }else{ 
        
// Any other browser
        
$hostname urlencode ($hostname);
        return 
$hostname;
    }
}
?>

But in IE with a host that have a "|" like "T7R|Public 1" in the name, make the game won't start at all.
In Firefox 1.5 the game can't find the right host. A simple hostname like "OLD MEN RACING Public" gets encoded like "OLD+MEN+RACING+Public" which is also what I see in the game's Join Specific Game screen. But it gives a "Host not found on master server" message.

Edit:
As a matter of fact, all join links on LFSWorld give the same "Host not found on master server" message with Firefox. Or is that just me?
Last edited by mr Orange, .
mr Orange
S2 licensed
Quote from Anarchi-H :By the sounds of it you are only processing the first byte of the 4 bytes. You need to process them all because you can only get 8 cars in a byte.
The cars are in game order (i.e. the order they appear in the server list, left to right)

I processed each byte separately and that did the trick. Tnx!

Just because I'm curious, is it also possible to join the 4 bytes into one long string of bits?
mr Orange
S2 licensed
I'm having trouble in getting all the allowed cars from the host information (?action=hosts)
When I process the 4 bytes that hold the CARS information I only get the S1 cars (upto the MRT). Is there anyone who did sucseed in getting all the cars out?
Tnx
mr Orange
S2 licensed
Haha ok, no I'm not bothered. Tnx. In S1 there seemed to be a lot of effort in avoiding the stats to be used more than they had to. With restricted access time, etc. So I just wanted to be sure.
In our website (mrnl.net) the who-is-online list is visible on all pages so in some cases we would need the LFSstat feed twice. Tempting for a less gifted programmer - like my self - to just call LFSworld when ever we need it and just hamer the feed.
Anyway, I'll go the extra mile and cache as many things a possible.
Last edited by mr Orange, .
mr Orange
S2 licensed
Hello, we had a little who-is-online list on owr team's website. As I understand it http://www.lfsworld.net/pubstat/s1_racers_online.php can no longer be used for that. Instead we have to use http://www.lfsworld.net/pubstat/get_stat2.php?action=hosts
but there is a lot of data in there we don't use. Aren't you bothered by the extra bandwith it takes?
And is there a required cache time for this action?
Tnx!
mr Orange
S2 licensed
Maybe a launch control would also solve this problem.
The automatic start could be like 70-80% of a perfect start so that gifted racers can still take an advantage, but less gifted racers wouldn't have to apologize everytime they cause a restart.
FGED GREDG RDFGDR GSFDG