summaryrefslogtreecommitdiff
blob: 61758e621a9ad644002c31b32e2f2a28eb4b6c4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
--- a/uglygs.pl.orig	2003-06-30 11:37:59.000000000 -0400
+++ b/uglygs.pl	2003-06-30 11:38:30.000000000 -0400
@@ -8,7 +8,8 @@
 ##########                                      Contact uglygs@uglypunk.com                                    ##########
 #########################################################################################################################
 #########################################################################################################################
-require 'uglygs.conf';
+$qstatcfg = 'GENTOO_DIR/qstat.cfg';
+require 'GENTOO_DIR/uglygs.conf';
 
 $VERSION = "rc10";
 
@@ -23,7 +24,7 @@
 if (!-f $qstat) { die "Sorry the Qstat file doesn't exist, you may no have compiled it yet"};
 if (!-d  $data) { die "Sorry the data directory doesn't exist, it should be located here:  $data"};
 if (!-d  $tmp)  { die "Sorry the temp directory doesn't exist, it should be located here:  $tmp"};
-if (!-d  "./templates/$template") { die "Sorry the templates/template directory doesnt exist, it should be located here:  templates/$template"};
+if (!-d  "$templates/$template") { die "Sorry the templates/template directory doesnt exist, it should be located here:  $templates/$template"};
 
 if ($html eq "y"){
         if (!-f $rrdtool) { die "Sorry the rrdtool file doesn't exist, Please install RRDTOOL"};
@@ -88,7 +89,7 @@
 $timemonth = $time - 2592000;
 $timeyear = $time - 31536000;
 system(`rm $tmp/*.tmp`);
-require "templates/$template/graphs.conf";
+require "$templates/$template/graphs.conf";
 
 
 ################################# Seach everything VERY MESSY #########################
@@ -96,7 +97,7 @@
 if ($doscan eq "y"){
 
 
- 	open(QSTAT, "|$qstat -cfg qstat/qstat.cfg -maxsim 60 -timeout 8 -Ts ./templates/qstat $qstatcom $addports >> $tmp/serversannounce.tmp" );
+ 	open(QSTAT, "|$qstat -cfg $qstatcfg -maxsim 60 -timeout 8 -Ts $templates/qstat $qstatcom $addports >> $tmp/serversannounce.tmp" );
  	close(QSTAT);
 
 	if (-s "$tmp/serversannounce.tmp"){
@@ -121,7 +122,7 @@
   $defport = $tabledata[2];
   $defport =~ s/\n//;
   if ($tabledata[0] eq "Q3S") {
-    open (QSTAT, "$qstat -cfg qstat/qstat.cfg -nh -R -q3s $tabledata[1]:$defport|");
+    open (QSTAT, "$qstat -cfg $qstatcfg -nh -R -q3s $tabledata[1]:$defport|");
     @qstatoutput = <QSTAT>;
     $qstatoutput = $qstatoutput[1];
     if ($qstatoutput =~m/version=Wolf /) {
@@ -172,7 +173,7 @@
 
 ############################# SERVER QUERY PROCESSING ###############################
 
-system( "$qstat -cfg qstat/qstat.cfg -maxsim 60 -timeout 8 -Ts ./templates/sqdata -of $tmp/sqservers.tmp -f $configfile" );
+system( "$qstat -cfg $qstatcfg -maxsim 60 -timeout 8 -Ts $templates/sqdata -of $tmp/sqservers.tmp -f $configfile" );
     
 open (PROCESS, "< $tmp/sqservers.tmp");
 @name = <PROCESS>;
@@ -194,7 +195,7 @@
                 $defport = $tabledata[2];
                 $defport =~ s/\n//;
                 if ($tabledata[0] eq "GPS") {
-                        open (QSTAT, "$qstat -cfg qstat/qstat.cfg -nh -R -gps $tabledata[1]:$defport|");
+                        open (QSTAT, "$qstat -cfg $qstatcfg -nh -R -gps $tabledata[1]:$defport|");
                         @qstatoutput = <QSTAT>;
                         $qstatoutput = $qstatoutput[1];
 
@@ -206,7 +207,7 @@
                         close(QSTAT);
 
                 } elsif ($tabledata[0] eq "RWS") {
-                        open (QSTAT, "$qstat -cfg qstat/qstat.cfg -nh -R -rws $tabledata[1]:$defport|");
+                        open (QSTAT, "$qstat -cfg $qstatcfg -nh -R -rws $tabledata[1]:$defport|");
                         @qstatoutput = <QSTAT>;
                         $qstatoutput = $qstatoutput[1];
                                 if ($qstatoutput =~m/protocol=17,/) {
@@ -218,7 +219,7 @@
 
                         
                  } elsif ($tabledata[0] eq "RGS") {
-                         open (QSTAT, "$qstat -cfg qstat/qstat.cfg -nh -R -rgs $tabledata[1]:$defport|");
+                         open (QSTAT, "$qstat -cfg $qstatcfg -nh -R -rgs $tabledata[1]:$defport|");
                          @qstatoutput = <QSTAT>;
                          $qstatoutput = $qstatoutput[1];
 
@@ -231,7 +232,7 @@
                         close(QSTAT);
 
                  } elsif ($tabledata[0] eq "SMS") {
-                         open (QSTAT, "$qstat -cfg qstat/qstat.cfg -nh -R -sms $tabledata[1]:$defport|");
+                         open (QSTAT, "$qstat -cfg $qstatcfg -nh -R -sms $tabledata[1]:$defport|");
                          @qstatoutput = <QSTAT>;
                          $qstatoutput = $qstatoutput[1];
 
@@ -247,7 +248,7 @@
 
 
                  } elsif ($tabledata[0] eq "GOS") {
-                         open (QSTAT, "$qstat -cfg qstat/qstat.cfg -nh -R -gos $tabledata[1]:$defport|");
+                         open (QSTAT, "$qstat -cfg $qstatcfg -nh -R -gos $tabledata[1]:$defport|");
                          @qstatoutput = <QSTAT>;
                          $qstatoutput = $qstatoutput[1];
 
@@ -261,7 +262,7 @@
 
 
                  } elsif ($tabledata[0] eq "SF2S") {
-                         open (QSTAT, "$qstat -cfg qstat/qstat.cfg -nh -R -sf2s $tabledata[1]:$defport|");
+                         open (QSTAT, "$qstat -cfg $qstatcfg -nh -R -sf2s $tabledata[1]:$defport|");
                          @qstatoutput = <QSTAT>;
                          $qstatoutput = $qstatoutput[1];
                                 if ($qstatoutput =~m/version=SOF2MP V1.02t/) {
@@ -301,7 +302,7 @@
 
 
 if ($html eq "y"){
-  open(TOTALOUT, "$qstat -cfg qstat/qstat.cfg -R -sort $htmlgame  -maxsim 60 -timeout 4 -Th ./templates/$template/header.html -Tt ./templates/$template/footer.html -Ts ./templates/$template/data.html -f $configfile 2> /dev/null |");
+  open(TOTALOUT, "$qstat -cfg $qstatcfg -R -sort $htmlgame  -maxsim 60 -timeout 4 -Th $templates/$template/header.html -Tt $templates/$template/footer.html -Ts $templates/$template/data.html -f $configfile 2> /dev/null |");
   while( $totalline = <TOTALOUT> ){
     my @totaldata = split(/ /,$totalline);
      if ($totaldata[0] eq "<!--" and $totaldata[1] eq "gamedetails"){
@@ -372,7 +373,7 @@
     $graph = "$tabledata[0]$tabledata[1]$port";
 
       
-    open(QSTAT, "$qstat -cfg qstat/qstat.cfg -R -P -sort $htmlplayer -maxsim 60 -timeout 4 -Th ./templates/$template/gameheader.html -Tt ./templates/$template/gamefooter.html -Ts ./templates/$template/gamedata.html -Tp ./templates/$template/gameplayer.html -$gametype $tabledata[1]:$port | "); 
+    open(QSTAT, "$qstat -cfg $qstatcfg -R -P -sort $htmlplayer -maxsim 60 -timeout 4 -Th $templates/$template/gameheader.html -Tt $templates/$template/gamefooter.html -Ts $templates/$template/gamedata.html -Tp $templates/$template/gameplayer.html -$gametype $tabledata[1]:$port | "); 
      while($serverline = <QSTAT>){
      my @data = split(/ /,$serverline);
      if ($data[0] eq "<!--" and $data[1] eq "gamedetails"){
--- a/uglygs.pl.orig	2003-06-30 13:56:01.000000000 -0400
+++ b/uglygs.pl	2003-06-30 13:59:17.000000000 -0400