Urban Terror Forums: Master server XML feed? - Urban Terror Forums

Jump to content

 Login | Register 
Advertisement
Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Master server XML feed? Rate Topic: -----

#1 User is offline   illogical Icon

  •   verified user   
    Retired Master Server Administrator
  • Account: illogical
  • Main tag: 6th|
  • Country:
  • Joined: 08-March 10
  • Posts: 2,349

Posted 15 February 2005 - 11:42 AM

I'm tossing around the idea of making an XML feed for the master server and scanner. Basically, you'd be able to request all servers, or an individual server. Possible uses include clan page server stats, server stats bots, etc. If anyone will use it, I'll put it together.

#2 User is offline   ghozt (old) Icon

  • Joined: 16-January 04
  • Posts: 862
  • LocationDelaware, USA

Posted 15 February 2005 - 02:03 PM

word! this would be nice :D

#3 User is offline   Thespacedude Icon

Posted 16 February 2005 - 12:50 AM

I could prob. use this 8)

(Second time I've tried to post this, message didnt show up the first time I guess)

#4 User is offline   illogical Icon

  •   verified user   
    Retired Master Server Administrator
  • Account: illogical
  • Main tag: 6th|
  • Country:
  • Joined: 08-March 10
  • Posts: 2,349

Posted 16 February 2005 - 02:26 AM

Updated: added requestDescription for return errors
Updated: moved a lot of stuff around
Updated: request block

Ok, so I've cooked up a DTD for this feed. It will work with requesting all servers or just one. I'm thinking I'll omit Cvar's for full list requests, but include them for single server requests, just to be kind to the bandwidth. So here's the DTD, comments and suggestions welcome.

<?xml version="1.0" encoding="iso-8859-1" ?>
<!ELEMENT master (version,masterIP,masterPort,masterWeb?,masterDescription?,request?,admin+,server+)>
    <!ATTLIST master version CDATA #REQUIRED>
    <!ELEMENT masterIP (#PCDATA)>
    <!ELEMENT masterPort (#PCDATA)>
    <!ELEMENT masterWeb (#PCDATA)>
    <!ELEMENT masterDescription (#PCDATA)>
    <!ELEMENT admin (adminName,adminEmail?,adminWeb?,adminIRC?)>
        <!ELEMENT adminName (#PCDATA)>
        <!ELEMENT adminEmail (#PCDATA)>
        <!ELEMENT adminWeb (#PCDATA)>
        <!ELEMENT adminIRC (ircServer,ircPort?,ircChannel)>
            <!ATTLIST adminIRC ircServer CDATA "">
            <!ATTLIST adminIRC ircPort CDATA "">
            <!ATTLIST adminIRC ircChannel CDATA "">
    <!ELEMENT request (requestQuery,requestStatus,requestDescription?)>
        <!ELEMENT requestQuery (#PCDATA)>
        <!ELEMENT requestStatus (#PCDATA)>
        <!ELEMENT requestDescription (#PCDATA)>
    <!ELEMENT server (serverIP,serverPort,serverLastUpdate,serverGameName,serverGameVersion,serverVersion,serverProtocol,serverName,serverPure,serverPB,serverPassword,serverMap,serverType,serverCountry,serverMaxPlayers,serverCurrentPlayers,serverPrivatePlayers,serverPlayer*,serverCvar*)>
        <!ELEMENT serverIP (#PCDATA)>
        <!ELEMENT serverPort (#PCDATA)>
        <!ELEMENT serverLastUpdate (#PCDATA)>
        <!ELEMENT serverGameName (#PCDATA)>
        <!ELEMENT serverGameVersion (#PCDATA)>
        <!ELEMENT serverVersion (#PCDATA)>
        <!ELEMENT serverProtocol (#PCDATA)>
        <!ELEMENT serverName (#PCDATA)>
        <!ELEMENT serverPure (#PCDATA)>
        <!ELEMENT serverPB (#PCDATA)>
        <!ELEMENT serverPassword (#PCDATA)>
        <!ELEMENT serverMap (#PCDATA)>
        <!ELEMENT serverType (#PCDATA)>
        <!ELEMENT serverCountry (#PCDATA)>
        <!ELEMENT serverMaxPlayers (#PCDATA)>
        <!ELEMENT serverCurrentPlayers (#PCDATA)>
        <!ELEMENT serverPrivatePlayers (#PCDATA)>
        <!ELEMENT serverPlayer (playerName,playerScore,playerPing)>
            <!ATTLIST serverPlayer playerName CDATA "">
            <!ATTLIST serverPlayer playerScore CDATA "">
            <!ATTLIST serverPlayer playerPing CDATA "">
        <!ELEMENT serverCvar (cvarName,cvarValue)>
            <!ATTLIST serverCvar cvarName CDATA "">
            <!ATTLIST serverCvar cvarValue CDATA "">


If this is good with you all, I'll write it up in the next few days.

#5 User is offline   illogical Icon

  •   verified user   
    Retired Master Server Administrator
  • Account: illogical
  • Main tag: 6th|
  • Country:
  • Joined: 08-March 10
  • Posts: 2,349

Posted 16 February 2005 - 04:03 AM

So from this DTD, your responses would be something like...

For all servers:
<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE master SYSTEM "http://master.urbanterror.net/xml/master-0.1.dtd">
<master version="0.1">
    <masterIP>64.62.148.94</masterIP>
    <masterPort>27950</masterPort>
    <masterWeb>http://master.urbanterror.net/</masterWeb>
    <masterDescription>The Urban Terror master server</masterDescription>
    <admin>
        <adminName>Jeff Walter</adminName>
        <adminEmail>jeff@404ster.com</adminEmail>
        <adminWeb>http://www.404ster.com/</adminWeb>
        <adminIRC ircServer="irc.enterthegame.com" ircPort="6667" ircChannel="#UrbanDevelopers" />
    </admin>
    <request>
        <requestQuery>type=all</requestQuery>
        <requestStatus>0</requestStatus>
    </request>
    <server>
        <serverIP>64.71.177.226</serverIP>
        <serverPort>27960</serverPort>
        <serverLastUpdate>0</serverLastUpdate>
        <serverGameName>q3ut3</serverGameName>
        <serverGameVersion>3.7</serverGameVersion>
        <serverVersion>1.32</serverVersion>
        <serverProtocol>68</serverProtocol>
        <serverName>testing</serverName>
        <serverPure>1</serverPure>
        <serverPB>1</serverPB>
        <serverPassword>0</serverPassword>
        <serverMap>ut_casa</serverMap>
        <serverType>0</serverType>
        <serverCountry>US</serverCountry>
        <serverMaxPlayers>16</serverMaxPlayers>
        <serverCurrentPlayers>2</serverCurrentPlayers>
        <serverPrivatePlayers>0</serverPrivatePlayers>
        <serverPlayer playerName="test1" playerScore="0" playerPing="0" />
        <serverPlayer playerName="test2" playerScore="0" playerPing="0" />
    </server>
    <server>
        <serverIP>64.71.177.226</serverIP>
        <serverPort>27961</serverPort>
        <serverLastUpdate>0</serverLastUpdate>
        <serverGameName>q3ut3</serverGameName>
        <serverGameVersion>3.7</serverGameVersion>
        <serverVersion>1.32</serverVersion>
        <serverProtocol>68</serverProtocol>
        <serverName>testing 2</serverName>
        <serverPure>0</serverPure>
        <serverPB>1</serverPB>
        <serverPassword>0</serverPassword>
        <serverMap>ut_turnpike</serverMap>
        <serverType>7</serverType>
        <serverCountry>US</serverCountry>
        <serverMaxPlayers>14</serverMaxPlayers>
        <serverCurrentPlayers>0</serverCurrentPlayers>
        <serverPrivatePlayers>0</serverPrivatePlayers>
    </server>
</master>


For a single server:
<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE master SYSTEM "http://master.urbanterror.net/xml/master-0.1.dtd">
<master version="0.1">
    <masterIP>64.62.148.94</masterIP>
    <masterPort>27950</masterPort>
    <masterWeb>http://master.urbanterror.net/</masterWeb>
    <masterDescription>The Urban Terror master server</masterDescription>
    <admin>
        <adminName>Jeff Walter</adminName>
        <adminEmail>jeff@404ster.com</adminEmail>
        <adminWeb>http://www.404ster.com/</adminWeb>
        <adminIRC ircServer="irc.enterthegame.com" ircPort="6667" ircChannel="#UrbanDevelopers" />
    </admin>
    <request>
        <requestQuery>type=single&amp;ip=64.71.177.226&amp;port=27960</requestQuery>
        <requestStatus>0</requestStatus>
    </request>
    <server>
        <serverIP>64.71.177.226</serverIP>
        <serverPort>27960</serverPort>
        <serverLastUpdate>0</serverLastUpdate>
        <serverGameName>q3ut3</serverGameName>
        <serverGameVersion>3.7</serverGameVersion>
        <serverVersion>1.32</serverVersion>
        <serverProtocol>68</serverProtocol>
        <serverName>testing</serverName>
        <serverPure>1</serverPure>
        <serverPB>1</serverPB>
        <serverPassword>0</serverPassword>
        <serverMap>ut_casa</serverMap>
        <serverType>0</serverType>
        <serverCountry>US</serverCountry>
        <serverMaxPlayers>16</serverMaxPlayers>
        <serverCurrentPlayers>2</serverCurrentPlayers>
        <serverPrivatePlayers>0</serverPrivatePlayers>
        <serverPlayer playerName="test1" playerScore="0" playerPing="0" />
        <serverPlayer playerName="test2" playerScore="0" playerPing="0" />
        <serverCvar cvarName="sv_hostname" cvarValue="testing" />
        <serverCvar cvarName="sv_rate" cvarValue="10000" />
        <serverCvar cvarName="g_maxplayers" cvarValue="16" />
    </server>
</master>


And if an error occurs:
<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE master SYSTEM "http://master.urbanterror.net/xml/master-0.1.dtd">
<master version="0.1">
    <masterIP>64.62.148.94</masterIP>
    <masterPort>27950</masterPort>
    <masterWeb>http://master.urbanterror.net/</masterWeb>
    <masterDescription>The Urban Terror master server</masterDescription>
    <admin>
        <adminName>Jeff Walter</adminName>
        <adminEmail>jeff@404ster.com</adminEmail>
        <adminWeb>http://www.404ster.com/</adminWeb>
        <adminIRC ircServer="irc.enterthegame.com" ircPort="6667" ircChannel="#UrbanDevelopers" />
    </admin>
    <request>
        <requestQuery>type=single&amp;ip=64.71.177.226&amp;port=27962</requestQuery>
        <requestStatus>1</requestStatus>
        <requestDescription>No server found matching that IP and port</requestDescription>
    </request>
</master>


bullet_loaderAdvertisement

#6 User is offline   Trolan (old) Icon

  • Joined: 27-June 04
  • Posts: 190
  • LocationMilpitas, CA

Posted 16 February 2005 - 05:04 AM

To make this a bit more accessable for the faint of heart, there will be examples of how to work with this XML data in at least XSL, PHP and Perl. Ok, so the faint of heart wouldn't touch the XSL with a 10' pole, but the PHP/Perl options are still there.

EDIT: stuck in the 'completed' Perl example. Actual link to the example code will be forthcoming once the XML schema is 'complete' per illogical, and when the feed is also 'live.' Yes, there's example code how to use it, but it doesn't exist yet. Talk about putting the cart before the horse... :)

#7 User is offline   ghozt (old) Icon

  • Joined: 16-January 04
  • Posts: 862
  • LocationDelaware, USA

Posted 25 February 2005 - 04:35 AM

any news on this?

#8 User is offline   illogical Icon

  •   verified user   
    Retired Master Server Administrator
  • Account: illogical
  • Main tag: 6th|
  • Country:
  • Joined: 08-March 10
  • Posts: 2,349

Posted 25 February 2005 - 06:11 AM

I was hoping to get some feedback from you guys (other than Trolan haha). If you think the XML layout is good, let me know, I'll finish it up.

#9 User is offline   ghozt (old) Icon

  • Joined: 16-January 04
  • Posts: 862
  • LocationDelaware, USA

Posted 25 February 2005 - 07:15 AM

lol, like i know what im lookin at

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

Advertisement


Copyright © 1999-2024 Frozensand Games Limited  |  All rights reserved  |  Urban Terror™ and FrozenSand™ are trademarks of Frozensand Games Limited

Frozensand Games is a Limited company registered in England and Wales. Company Reg No: 10343942