whoswhere_xml.txt · Last modified: 2014/01/27 03:16 by JRandomNoob

whoswhere_xml

One regularly refreshed XML-File shows all online players and the server states. This data can be used by services running on DSWP server as well as by programs on clientside. Possible appraoch:

  • use XML-File per server output by B3 (perhaps modify)
  • create a PHP page which parses these 4 XML-Files and provides one big XML with all data (including Mumble, IRC and perhaps Forum)

Possible Structure:

<dswp>
	<time>1234567890</time>
	<servers>
		<tdm>
			<ip>dswp.de:22222</ip>
			<map>ut4_ramelle</map>
			<nextmap>ut4_riyadh</nextmap>
			<timeleft>3</timeleft>
			<players>35</players>
			<blue>
				<player>
					<name>DSWP.SMT</name>
					<forumname>Samtron</forumname>
					<id>10168</id>
					<kills>12</kills>
					<deaths>9</deaths>
					<color>FF0000</color>
				</player>
				<player>
					...
				</player>
			</blue>
			<red>
				<player>
					...
				</player>
			</red>
			<spec>
				<player>
					...
				</player>
			</spec>
		</tdm>
 
		<bomb>
			<ip>dswp.de:22223</ip>
			<map>ut4_ramelle</map>
			<nextmap>ut4_riyadh</nextmap>
			<timeleft>3</timeleft>
			<players>8</players>
			<blue>
				<player>
					...
				</player>
			</blue>
			<red>
				<player>
					...
				</player>
			</red>
			<spec>
				<player>
					...
				</player>
			</spec>
		</bomb>
 
		<jump>
			<ip>dswp.de:22224</ip>
			<map>ut4_ramelle</map>
			<nextmap>ut4_riyadh</nextmap>
			<timeleft>3</timeleft>
			<players>8</players>
			<blue>
				<player>
					...
				</player>
			</blue>
			<red>
				<player>
					...
				</player>
			</red>
			<spec>
				<player>
					...
				</player>
			</spec>
		</jump>
 
		<ts>
			<ip>dswp.de:22225</ip>
			<map>ut4_ramelle</map>
			<nextmap>ut4_riyadh</nextmap>
			<timeleft>3</timeleft>
			<players>8</players>
			<blue>
				<player>
					...
				</player>
			</blue>
			<red>
				<player>
					...
				</player>
			</red>
			<spec>
				<player>
					...
				</player>
			</spec>
		</ts>
		<mumble>
			...
		</mumble>
		<irc>
			...
		</irc>
 
		<forum>
			...
		</forum>
	<servers>
</dswp>