I came across the
XFCE4 GenMon plugin and wanted to use it to list gameservers which are good candidates to play on. That's the gameservers which
- are in waiting for players state (only)
- have at least one human connected
- are not hosted by myself
Of course online games cannot work if nobody starts hosting or connecting to dedicated servers in the first place. So keep in mind you also need to do this.
That said, I wrote this little quick + dirty script to list the gameservers which match the criteria above (be sure to modify
myplayername or filter by IP address instead):
#!/bin/sh
myplayername=tomreyn
# add this to the awk script to filter out own ip address: && $5 != "'$(wget -qO- http://whatismyip.org/)'"
for ipport in ` wget -qO- http://master.megaglest.org/showServersForGlest.php | grep -Ev '^$' | awk -F'|' '$14 == 0 && $4 !~ /^(headless\(|'$myplayername')/ { print $5":"$12 }' `
do
ip=`echo $ipport | cut -d: -f1`
isp=`dig -x $ip +short | awk -F. '{print $(NF-2)"."$(NF-1) }'`
printf '%s\n' "$ipport ($isp)"
done
Generally when accessing the master server, please don't hammer it, i.e. please no more requests than one every two minutes. So far we don't have caching there and I'd like to keep providing real time info, but if people hammer we'll have to either cache or block IPs. Thank you.