ASECO/RASP v0.91 released!

Discuss everything about Xymph's Aseco flavoured server control scripts for TM Forever / classic TMN and for TM² Canyon.

Moderators: Xymph, TM-Patrol

Xymph
Pit Crew
Pit Crew
Posts: 5723
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: ASECO/RASP v0.91 released!

Post by Xymph » 21 Dec 2007 16:03

soehest wrote:
Xymph wrote:
soehest wrote:Just noticed this:
[...snipped image...]

guess that can't be correct :-)
What isn't correct? That it says '<none>' for a player that has no server rank? Seems rather logical to me. :wink:
Oh the none part is correct to me as well :-) I was thinking that there are users sharing the same rank, how is that possible? Am i missing out on something as usual :mrgreen:
Ow, I overlooked that. :oops: Yes that looks odd, but it's possible when those players have exactly the same Avg. values.

Obtaining the rank number is done in an efficient but simplified way, not by sorting and counting down the entire players list but by merely counting how many players have an Avg. value that's less than that of the player you need the rank for. See this code:

Code: Select all

  function getRank($login) {

    $query = 'SELECT avg FROM rs_rank
              WHERE playerID=' . $this->aseco->getPlayerId($login);
    $res = mysql_query($query);
    if (mysql_num_rows($res) > 0) {
      $row = mysql_fetch_array($res);
      $query2 = 'SELECT * FROM rs_rank WHERE avg>0 and avg<' . $row['avg'];
      $res2 = mysql_query($query2);
      $query3 = 'SELECT * FROM rs_rank';
      $res3 = mysql_query($query3);
      $message = formatText('{1}/{2} Avg: {3}',
                            mysql_num_rows($res2)+1,
                            mysql_num_rows($res3),
                            sprintf("%4.1F", $row['avg']/10000));
      mysql_free_result($res2);
      mysql_free_result($res3);
    } else {
      $message = 'None';
    }
    mysql_free_result($res);
    return $message;
  }  // end getRank
Because $query2 for two players with a exact same Avg. value (e.g. Windows100 and Dante_Aligheri in your image) results in the same number, their ranks end up the same. I guess I can fix that in the next release with the more elaborate sorting/counting approach.

Btw, this is less likely to happen when you have more tracks on your server, and thus a smaller chance that players have the same Avg's.
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

User avatar
lille79
Pit Crew
Pit Crew
Posts: 881
Joined: 09 Dec 2007 15:04
Owned TM-games: TMN, TMNF, TMUF
Location: Norway
Contact:

Re: ASECO/RASP v0.91 released!

Post by lille79 » 21 Dec 2007 23:00

Magnificent speed on the "new" GBXRemote.inc.php :) "On steroids" is definetly a good description


/lille79
/lille79
Old man of the Norwegian Trackmania team Super Sheep Racing
To visit my homepage/blog, and download the usbTMFserver, this is the place to go.

User avatar
lgrfbs-sweden
smooth traffic navigator
smooth traffic navigator
Posts: 200
Joined: 15 Apr 2007 15:48
Owned TM-games: TMN
Location: Sweden
Contact:

Re: ASECO/RASP v0.91 released!

Post by lgrfbs-sweden » 24 Dec 2007 00:37

how do I make so "åäö" can be used in config.xml within: <welcome> </welcome> tags?
Admin On:Image
My server:lgrfbs server / XASECO plugins
Image

Assembler Maniac
Pit Crew
Pit Crew
Posts: 1493
Joined: 03 Jun 2006 13:24
Owned TM-games: TMU
Contact:

Re: ASECO/RASP v0.91 released!

Post by Assembler Maniac » 24 Dec 2007 01:52

Try downloading foxe from http://www.firstobject.com . It's an xml editing program that outputs the xml file in true utf-8 format, so that it should read/process just fine from aseco (or any other tool).

Not sure what to do if that won't work though.
Asus P4C800-E Deluxe
P4 3.2Ghz @ 3.35Ghz
2G Kingston Hyper-X DDR 2
ATI Radeon X850 XT Platinum 256M
Sound Blaster Audigy II
2x 120G Maxtor Hard drives
HDTV Tuner Card (Fusion 5 Gold)

User avatar
lgrfbs-sweden
smooth traffic navigator
smooth traffic navigator
Posts: 200
Joined: 15 Apr 2007 15:48
Owned TM-games: TMN
Location: Sweden
Contact:

Re: ASECO/RASP v0.91 released!

Post by lgrfbs-sweden » 24 Dec 2007 09:30

guess "foxe" is same as "firstobject XML Editor", right ?
Downloading "firstobject XML Editor" now for see what it is :wink:

Edit: Do not working for me, sorry.
Tryed both "UTF-8" and "UTF-8 with preamble" and gets same bad result.
Thanks for the tip about the "firstobject XML Editor" program.
Admin On:Image
My server:lgrfbs server / XASECO plugins
Image

Assembler Maniac
Pit Crew
Pit Crew
Posts: 1493
Joined: 03 Jun 2006 13:24
Owned TM-games: TMU
Contact:

Re: ASECO/RASP v0.91 released!

Post by Assembler Maniac » 24 Dec 2007 14:27

Yes, that's the right program.

What's the error you get when you try to use those characters?
lgrfbs-sweden wrote:guess "foxe" is same as "firstobject XML Editor", right ?
Downloading "firstobject XML Editor" now for see what it is :wink:

Edit: Do not working for me, sorry.
Tryed both "UTF-8" and "UTF-8 with preamble" and gets same bad result.
Thanks for the tip about the "firstobject XML Editor" program.
Asus P4C800-E Deluxe
P4 3.2Ghz @ 3.35Ghz
2G Kingston Hyper-X DDR 2
ATI Radeon X850 XT Platinum 256M
Sound Blaster Audigy II
2x 120G Maxtor Hard drives
HDTV Tuner Card (Fusion 5 Gold)

User avatar
lgrfbs-sweden
smooth traffic navigator
smooth traffic navigator
Posts: 200
Joined: 15 Apr 2007 15:48
Owned TM-games: TMN
Location: Sweden
Contact:

Re: ASECO/RASP v0.91 released!

Post by lgrfbs-sweden » 25 Dec 2007 01:09

I have set my welcome text to be a popup window and if I use "åäö" in this text
the welcome popup will never a appear as it do without "åäö" in the text.

"åäö" in text = No welcome popup.
"åäö" not in text = welcome popup works fine.

Is it a logfile you want to see to, if so what is the filename?
Admin On:Image
My server:lgrfbs server / XASECO plugins
Image

Assembler Maniac
Pit Crew
Pit Crew
Posts: 1493
Joined: 03 Jun 2006 13:24
Owned TM-games: TMU
Contact:

Re: ASECO/RASP v0.91 released!

Post by Assembler Maniac » 25 Dec 2007 01:14

lgrfbs-sweden wrote:I have set my welcome text to be a popup window and if I use "åäö" in this text
the welcome popup will never a appear as it do without "åäö" in the text.

"åäö" in text = No welcome popup.
"åäö" not in text = welcome popup works fine.

Is it a logfile you want to see to, if so what is the filename?
Ok, I understand now. I'll try to clip these characters and paste them into a message box.

Is it only a problem with TMN, or does it happen with TMU as well? (if you don't know, that's ok too)
Asus P4C800-E Deluxe
P4 3.2Ghz @ 3.35Ghz
2G Kingston Hyper-X DDR 2
ATI Radeon X850 XT Platinum 256M
Sound Blaster Audigy II
2x 120G Maxtor Hard drives
HDTV Tuner Card (Fusion 5 Gold)

User avatar
lgrfbs-sweden
smooth traffic navigator
smooth traffic navigator
Posts: 200
Joined: 15 Apr 2007 15:48
Owned TM-games: TMN
Location: Sweden
Contact:

Re: ASECO/RASP v0.91 released!

Post by lgrfbs-sweden » 25 Dec 2007 01:35

I have only TMN so I do not know how its works in other games.
We are using ASECO/RASP v0.91 on the server.

You will get a PM with my config.xml file.
Admin On:Image
My server:lgrfbs server / XASECO plugins
Image

Xymph
Pit Crew
Pit Crew
Posts: 5723
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: ASECO/RASP v0.91 released!

Post by Xymph » 25 Dec 2007 10:32

lgrfbs-sweden wrote:I have set my welcome text to be a popup window and if I use "åäö" in this text
the welcome popup will never a appear as it do without "åäö" in the text.

"åäö" in text = No welcome popup.
"åäö" not in text = welcome popup works fine.

Is it a logfile you want to see to, if so what is the filename?
Whether you want to display the welcome message in a pop-up or in the chat doesn't matter, those characters will cause such a message not to be displayed. I found this a while ago while debugging another problem on a Swedish server. The root cause is probably the UTF-8 vs. Latin character set issue.
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

User avatar
lgrfbs-sweden
smooth traffic navigator
smooth traffic navigator
Posts: 200
Joined: 15 Apr 2007 15:48
Owned TM-games: TMN
Location: Sweden
Contact:

Re: ASECO/RASP v0.91 released!

Post by lgrfbs-sweden » 26 Dec 2007 00:41

Reading yours links.....
The system is a:
RedHat Linux Fedora 8
ASECO/RASP v0.91
TMN Server
(Nation: SWE Name: lgrfbs_server Game:TMN)

I do not know if this matter but the "åäö" in remoteCP:s adminchat is working fine.

I shall read yours link a pair times and see if I can get it.
Admin On:Image
My server:lgrfbs server / XASECO plugins
Image

[RoD]Priit
road tourist
road tourist
Posts: 80
Joined: 03 Jan 2007 21:03
Owned TM-games: TMN & TMUF
Contact:

Re: ASECO/RASP v0.91 released!

Post by [RoD]Priit » 29 Dec 2007 17:03

Is possible Ban Vote?
Like: Ban Player?
Yes No

And must be 51% yes to ban or something?
Looking New members, if you want join uu and drive CWs then join mof.planet.ee

User avatar
f*ckfish
Pit Crew
Pit Crew
Posts: 1302
Joined: 15 Jun 2007 07:59
Owned TM-games: TMNF, TMUF
Location: Dresden, Germany
Contact:

Re: ASECO/RASP v0.91 released!

Post by f*ckfish » 29 Dec 2007 20:11

lgrfbs-sweden wrote:I have set my welcome text to be a popup window and if I use "åäö" in this text
the welcome popup will never a appear as it do without "åäö" in the text.

"åäö" in text = No welcome popup.
"åäö" not in text = welcome popup works fine.

Is it a logfile you want to see to, if so what is the filename?
I don't know if this helps solving the problem, but when I wrote the fufi-tools I had problems with "cryptic" servernames for the welcome message popup so I encoded them to utf8 first and it worked (At least with the ones I tested).

Code: Select all

$jfreuservername = utf8_encode($aseco->server->jfreu->servername);
inactive, sorry

User avatar
lgrfbs-sweden
smooth traffic navigator
smooth traffic navigator
Posts: 200
Joined: 15 Apr 2007 15:48
Owned TM-games: TMN
Location: Sweden
Contact:

Re: ASECO/RASP v0.91 released!

Post by lgrfbs-sweden » 30 Dec 2007 18:02

Xymph
From php.ini on the game server:

Code: Select all

; As of 4.0b4, PHP always outputs a character encoding by default in
; the Content-type: header.  To disable sending of the charset, simply
; set it to be empty.
;
; PHP's built-in default is text/html
default_mimetype = "text/html"
;default_charset = "iso-8859-1"

; Always populate the $HTTP_RAW_POST_DATA variable.
;always_populate_raw_post_data = On
Sorry, I can not find more info in yours links, maybe I missed something.
Way is the complete welcome text not showing then one char is "bad", this
most well be a bug?
_______________________________________________________________________

f*ckfish
where shall I put your code?
which file reads the config.xml file ?
Admin On:Image
My server:lgrfbs server / XASECO plugins
Image

User avatar
f*ckfish
Pit Crew
Pit Crew
Posts: 1302
Joined: 15 Jun 2007 07:59
Owned TM-games: TMNF, TMUF
Location: Dresden, Germany
Contact:

Re: ASECO/RASP v0.91 released!

Post by f*ckfish » 30 Dec 2007 18:57

Try that one:
Find the line 1095 in aseco.php saying :

Code: Select all

$message = str_replace('{br}', LF, $this->formatColors($message));
and replace it with the following:

Code: Select all

$message = utf8_encode(str_replace('{br}', LF, $this->formatColors($message)));
Untested ;-)
inactive, sorry

Post Reply