--- modules/Pisg/HTMLGenerator.pm.orig Wed Feb 14 22:41:09 2007 +++ modules/Pisg/HTMLGenerator.pm Mon Mar 3 15:05:17 2008 @@ -1970,6 +1970,10 @@ splice @badpos, 0, @badpos - $self->{cfg}->{karmahistory} if @badpos > $self->{cfg}->{karmahistory}; + my @nopos = grep { $karma{$_} == 0 } @popular; + splice @nopos, $self->{cfg}->{karmahistory}, @nopos + if @nopos > $self->{cfg}->{karmahistory}; + my $pos = 0; foreach my $thing (@goodpos) { my $class = ($pos++ == 0) ? 'hirankc' : 'rankc'; @@ -1992,11 +1996,35 @@ _html(""); } - if (@goodpos and @badpos) { - _html(""); - _html(""); + _html(""); + _html(""); + _html(""); + + $pos = @nopos; + foreach my $thing (@nopos) { + my $class = ($pos == 1) ? 'hirankc' : 'rankc'; + my $Thing = $self->_format_word(is_nick($thing) || $thing); + _html(" "); + _html("$Thing"); + _html("$karma{$thing}"); + + my @k = grep { $self->{stats}->{karma}{$thing}{$_} > 0 } + (keys %{ $self->{stats}->{karma}{$thing} }); + @k = $self->_trimlist(@k); + my $n = join ', ', map { $self->_format_word($_) } @k; + _html("$n"); + + @k = grep { $self->{stats}->{karma}{$thing}{$_} < 0 } + (keys %{ $self->{stats}->{karma}{$thing} }); + @k = $self->_trimlist(@k); + $n = join ', ', map { $self->_format_word($_) } @k; + _html("$n"); _html(""); } + + _html(""); + _html(""); + _html(""); $pos = @badpos; foreach my $thing (@badpos) { --- modules/Pisg/Parser/Logfile.pm.orig Wed Feb 14 22:41:09 2007 +++ modules/Pisg/Parser/Logfile.pm Mon Mar 3 15:05:48 2008 @@ -419,11 +419,17 @@ } # require 2 chars (catches C++), nick must not end in [+=-] - if ($saying =~ /^(\S+[^\s+=-])(\+\+|==|--)$/) { + if ($saying =~ /^(\S+[ ]+)(rox|rlz|ftw|sux)/) { my $thing = lc $1; - my $k = $2 eq "++" ? 1 : ($2 eq "==" ? 0 : -1); - $stats->{karma}{$thing}{$nick} = $k - if $thing =~ /\w\W*?\w/ and !is_ignored($thing) and $thing ne lc($nick); + my $test = $2; + my $k = 0; + if ($test =~ /^(ftw|rox|rlz)$/) { + $k = 1; + } + if ($test =~ /^sux$/) { + $k = -1; + } + $stats->{karma}{$thing}{$nick} = $k; } # Find URLs