|
|
@@ -25,7 +25,7 @@ my ($channel, $logfile, $format, $network, $outputfile, $maintainer,
|
|
|
$pagehead, $usersfile, $imagepath, $logdir, $lang, $bgcolor, $text, $hbgcolor,
|
|
|
$hcolor, $hicell, $hicell2, $tdcolor, $tdtop, $link, $vlink, $hlink, $headline,
|
|
|
$rankc, $minquote, $maxquote, $activenicks, $activenicks2, $topichistory,
|
|
|
-$nicktracking, $timeoffset, $version, $debug, $debugfile);
|
|
|
+$pic1, $pic2, $nicktracking, $timeoffset, $version, $debug, $debugfile);
|
|
|
|
|
|
# Values that _MUST_ be set below (unless you pass them on commandline)
|
|
|
$channel = "#channel"; # The name of your channel.
|
|
|
@@ -37,7 +37,7 @@ $maintainer = "MAINTAINER"; # The maintainer or bot which makes the logfile
|
|
|
$pagehead = "none"; # Some 'page header' file which you want to
|
|
|
# include in top of the stats
|
|
|
|
|
|
-$usersfile = "users.cfg"; # Path to users config file (aliases, ignores,
|
|
|
+$usersfile = "/usr/local/apache/cgi-bin/users.cfg"; # Path to users config file (aliases, ignores,
|
|
|
# pics and more, see users.cfg for examples)
|
|
|
|
|
|
$imagepath = ""; # If your user pictures is located
|
|
|
@@ -64,6 +64,8 @@ $vlink = "#0b407a"; # Color of visited links
|
|
|
$hlink = "#0b407a"; # Color of hovered links
|
|
|
$headline = "#000000"; # Border color of headlines
|
|
|
$rankc = "#CCCCCC"; # Colors of 'ranks' (1,2,3,4)
|
|
|
+$pic1 = "pipe-blue.png" # Bar-graphic-file for normal times
|
|
|
+$pic2 = "pipe-purple.png" # Bar-graphic-file for top-times
|
|
|
|
|
|
# Other things that you might set, but not everyone cares about them
|
|
|
$minquote = "25"; # Minimal value of letters for a random quote
|
|
|
@@ -83,7 +85,7 @@ $timeoffset = "+0"; # A time offset on the stats page - if your
|
|
|
# You shouldn't care about anything below this point
|
|
|
$debug = 0; # 0 = Debugging off, 1 = Debugging on
|
|
|
$debugfile = "debug.log"; # Path to debug file(must be set if $debug == 1)
|
|
|
-$version = "v0.17pre1";
|
|
|
+$version = "v0.16-cvs-dh1";
|
|
|
|
|
|
my ($lines, $kicked, $gotkicked, $smile, $longlines, $time, $timestamp, %alias,
|
|
|
$normalline, $actionline, $thirdline, @ignore, $line, $processtime, @topics,
|
|
|
@@ -125,11 +127,11 @@ sub init_pisg
|
|
|
|
|
|
$timestamp = time;
|
|
|
|
|
|
- if ($timeoffset =~ /\+(\d+)/) {
|
|
|
+ if ($timeoffset =~ /\+(\d)/) {
|
|
|
# We must plus some hours to the time
|
|
|
$timestamp += 3600 * $1; # 3600 seconds per hour
|
|
|
|
|
|
- } elsif ($timeoffset =~ /-(\d+)/) {
|
|
|
+ } elsif ($timeoffset =~ /-(\d)/) {
|
|
|
# We must remove some hours from the time
|
|
|
$timestamp -= 3600 * $1; # 3600 seconds per hour
|
|
|
}
|
|
|
@@ -180,6 +182,7 @@ sub init_lineformats {
|
|
|
$normalline = '^\[(\d+):\d+\] <([^>]+)> (.*)';
|
|
|
$actionline = '^\[(\d+):\d+\] \* (\S+) (.*)';
|
|
|
$thirdline = '^\[(\d+):(\d+)\] (\S+) (\S+) (\S+) (\S+) (\S+) (\S+)(.*)';
|
|
|
+
|
|
|
} else {
|
|
|
die("Logfile format not supported, check \$format setting.\n");
|
|
|
}
|
|
|
@@ -870,26 +873,27 @@ sub activetimes
|
|
|
|
|
|
my @now = localtime($timestamp);
|
|
|
|
|
|
- my $image = "pipe-blue.png";
|
|
|
+ my $image;
|
|
|
|
|
|
for my $hour (sort keys %times) {
|
|
|
debug("Time: $hour => ". $times{$hour});
|
|
|
-
|
|
|
if ($toptime[0] == $hour) {
|
|
|
- $image = "pipe-purple.png";
|
|
|
+ $image = $pic2;
|
|
|
+ } else {
|
|
|
+ $image = $pic1;
|
|
|
}
|
|
|
|
|
|
my $size = ($times{$hour} / $highest_value) * 100;
|
|
|
my $percent = ($times{$hour} / $lines) * 100;
|
|
|
$percent =~ s/(\.\d)\d+/$1/;
|
|
|
|
|
|
- if ($timeoffset =~ /\+(\d+)/) {
|
|
|
+ if ($timeoffset =~ /\+(\d)/) {
|
|
|
# We must plus some hours to the time
|
|
|
$hour += $1;
|
|
|
$hour = $hour % 24;
|
|
|
if ($hour < 10) { $hour = "0" . $hour; }
|
|
|
|
|
|
- } elsif ($timeoffset =~ /-(\d+)/) {
|
|
|
+ } elsif ($timeoffset =~ /-(\d)/) {
|
|
|
# We must remove some hours from the time
|
|
|
$hour -= $1;
|
|
|
$hour = $hour % 24;
|
|
|
@@ -1650,7 +1654,7 @@ sub htmlfooter
|
|
|
{
|
|
|
print OUTPUT <<HTML;
|
|
|
<span class="small">
|
|
|
-Stats generated by <a href="http://pisg.sourceforge.net/" title="Go to the pisg homepage">pisg</a> $version<br>
|
|
|
+Stats generated by <a href="http://www.wtf.dk/hp/index.php?page=pisg" title="Go to the pisg homepage">pisg</a> $version<br>
|
|
|
pisg by <a href="http://www.wtf.dk/hp/" title="Go to the authors homepage">Morten "LostStar" Brix Pedersen</a> and others<br>
|
|
|
Stats generated in $processtime
|
|
|
</span>
|