#!/usr/bin/perl
#########################################################################################################################
#########################################################################################################################
##########                                      UgLy game search engine v rc10                                 ##########
##########                                      Written for the valhalla Lan                                   ##########
##########                                      To be used whith many programs eg,                             ##########
##########                              Gametrakker, Serverquery or any qstat backing prog                     ##########
##########                                      Contact uglygs@uglypunk.com                                    ##########
#########################################################################################################################
#########################################################################################################################

$runmode = "loop";                                              # Run mode, Run as a loop or as a cron Executable

$configfile = "servers.cfg";                                    # The Result file to be passed to other programs
$qstat = "qstat/qstat";                                         # The modified qstat file
$cat = "/bin/cat";                                              # The cat file location
$data = "./data";                                               # Data Directory
$tmp = "./tmp";                                                 # Temp Directory
$template = "default";						# Template Directory
$staticcfgfile = "$data/servers.static";                        # A Static output file to append to final output 

$refresh = "180";						# # If loop is on what is your update rate in sec 
		
$serverquery = "n";                                             # Do u want Server Query output y or n
$serverqueryfile = "/var/www/html/servers.cfg";                 # The output file for server query 

$html = "n";							# Do you want HTML output 
$htmlgame="l";							# Game List Sort Order p=by-ping, g=by-game, i=by-IP-address, h=by-hostname, n=by-#-players, l=by-list-order
$htmlplayer="F";						# Player List Sort Order P=by-ping, F=by-frags, T=by-team
$htmldir = "/var/www/html/uglygs";				# The html output Directory
$htmlfile = "servers";						# The html output file
$htmlext = "html";						# THe file Ext eg. html, php, pl, asp
$htmlalias = "/uglygs";                                         # The html Directory Alias
$rrdtool = "rrdtool/src/rrdtool";                               # Location of rrdtool

$doscan = "y";							# Do you want the scan enabled 
$netmaskbc = "192.168.0.255";                                   # Your network Broadcast Address


$addports ="";							# Any additional game server commands in qstat layout eg " -uns +255.255.255.255:7780"


#####################################################################################################
##########################################  Game support ############################################
#####################################################################################################


$amar = "y";                                                    # query Americas Army servers
$amarp  = "1717,1718,1719,1720";                                # Ports for game type Americas Army

$avpII = "y";                                                   # query Alien Vs Preditor 2 & shogo servers
$avpIIp  = "27888,27889";                                       # Ports for game type Alien vs Preditor 2

$battlefield = "y";                                             # query battlefield 1942 servers
$battlefieldp  = "14567";                                       # Ports for game type battlefield 1942

$battlefieldl = "y";                                             # query battlefield 1942 LAN servers
$battlefieldlp  = "14567";                                       # Ports for game type battlefield 1942 LAN

$descentIII = "y";                                              # query Descent 3 servers
$descentIIIp  = "2092";                                         # Ports for game type Descent III

$globalops = "y";                                               # query Global Operations servers
$globalopsp  = "27888";                                         # Ports for game type Global Operations

$gore = "y";                                                    # query Gore servers
$gorep  = "10052";                                              # Ports for game type Gore

$halflife = "y";                                                # query Half-Life servers
$halflifep = "27015,27016,27017,27018,27019";                   # Ports for game type Half Life

$hereticII = "y";                                               # query Heretic II servers
$hereticIIp  = "28910";                                         # Ports for game type Heretic II

$hexenII = "y";                                                 # query Hexen II servers
$hexenIIp  = "26900";                                           # Ports for game type Hexen II 

$hexenWorld = "y";                                              # query HexenWorld servers
$hexenWorldp  = "26950";                                        # Ports for game type HexenWorld 

$igi2 ="y";                                                     # query IGI-2 Covert Strike servers
$igi2p = "26001";                             			# Ports for game type IGI-2 Covert Strike

$jkII ="y";                                                     # query Jedi Knight 2 servers
$jkIIp = "28070,28071,28072,28073";                             # Ports for game type Jedi Knight 2

$kingpin = "y";                                                 # query Kingpin servers
$kingpinp = "31510";                                            # Ports for game type Kingpin

$mohaa = "y";                                                   # query Medal of Honor: Allied Assault servers
$mohaap = "12203,12204,12205,12206";                            # Ports for game type Medal of Honor: Allied Assault

$nwn = "y";                                                     # query Never Winter Nights servers
$nwnp = "5120,5121,5122,5123,5124,5125";                        # Ports for game type Never Winter Nights

$quake = "y";                                                   # query Quake servers
$quakep = "26000,26001,26002,26003";                            # Ports for game type Quake 1 

$quakeII = "y";                                                 # query Quake II servers
$quakeIIp = "27910,27911,27912,27913";                          # Ports for game type Quake 2

$quakeIII = "y";                                                # query Quake III: Arena servers/ Return to Castle Wolfenstien/ Star Trek: Elite Force
$quakeIIIp = "27960,27961,27962,27963";                         # Ports for game type Quake 3 Arena/ Return to Castle Wolfenstien/ Star Trek: Elite Force

$quakeWorld = "y";                                              # query QuakeWorld servers
$quakeWorldp="27500,27501,27502,27503";                         # Ports for game type QuakeWorld 

$rallymas = "y";                                                # query Rally Masters servers
$rallymasp  = "16666";                                          # Ports for game type Rally Masters

$renegade = "y";                                                # query C&C Renegade servers
$renegadep  = "4848";                                           # Ports for game type c&c Renegade

$sin = "y";                                                     # query Sin servers
$sinp  = "22450";                                               # Ports for game type Sin

$sds = "y";                                                     # query Soldat servers
$sdsp  = "23073";                                               # Ports for game type Soldat

$sms = "y";                                                     # query Serious Sam I/II servers
$smsp  = "25600,25601";                                         # Ports for game type Serious Sam I/II 

$sof = "y";                                                     # query Soldier of Fortune servers
$sofp  = "28910";                                               # Ports for game type Soldier of Fortune

$sofII = "y";                                                   # query Soldier of Fortune II servers
$sofIIp  = "20100,20101,20102,20103";                           # Ports for game type Soldier of Fortune II

$tribes = "y";                                                  # query Tribes servers
$tribesp  = "28001 ";                                           # Ports for game type Tribes

$tribesII = "y";                                                # query Tribes 2 servers
$tribesIIp  = "28000";                                          # Ports for game type Tribes 2

$unreal = "y";                                                  # query Unreal servers
$unrealp = "7778,7779,7780,7781,7782,7783";                     # Ports for game type Unreal/Unreal Tournament/Rune

$unreal2 = "y";                                                 # query UT 2 servers
$unreal2p = "7777";                     			# Ports for game type UT 2

$v8c = "y";                                                     # query V8 Supercar Challenge servers
$v8cp = "16700";                                                # Ports for game type V8 Supercar Challenge

$vcg = "y";                                                     # query VietCong Game servers
$vcgp = "5425";                                                 # Ports for game type VietCong Game

