Index: pisg-0.70/lang.txt =================================================================== --- pisg-0.70.orig/lang.txt +++ pisg-0.70/lang.txt @@ -87,6 +87,10 @@ allcaps2 = "[:nick] just forgot t allcaps3 = "Everybody had their shift-key under control. :)" allcapstext = "For example, like this:
     [:line]" +hump1 = "Looks like [:nick] hasn't get layed in the last couple of weeks. [:He:She:] humped others [:hump] times." +hump2 = "[:nick] also needs to get layed. [:He:She:] humped others [:hump] times." +humptext = "See for yourself:
     [:line]" + violent1 = "[:nick] is a very aggressive person. [:He:She:] attacked others [:attacks] times." violent2 = "[:nick] can't control [:his:her:] aggressions, either. [:He:She:] picked on others [:attacks] times." violent3 = "Nobody beat anyone up. Everybody was friendly." Index: pisg-0.70/modules/Pisg.pm =================================================================== --- pisg-0.70.orig/modules/Pisg.pm +++ pisg-0.70/modules/Pisg.pm @@ -152,6 +152,8 @@ sub get_default_config_settings showlastseen => 1, showlegend => 1, showkickline => 1, + showhumpers => 1, + showhumpline => 1, showactionline => 1, showfoulline => 0, showfouldecimals => 1, Index: pisg-0.70/modules/Pisg/HTMLGenerator.pm =================================================================== --- pisg-0.70.orig/modules/Pisg/HTMLGenerator.pm +++ pisg-0.70/modules/Pisg/HTMLGenerator.pm @@ -126,6 +126,7 @@ sub create_output $self->_questions(); $self->_shoutpeople(); $self->_capspeople(); + $self->_humpers(); $self->_violent(); $self->_mostsmiles(); $self->_mostsad(); @@ -857,6 +858,43 @@ sub _shoutpeople } +sub _humpers +{ + # The persons who humped others the most + my $self = shift; + + my @hump = sort { $self->{stats}->{humping}{$b} <=> $self->{stats}->{humping}{$a} } keys %{ $self->{stats}->{humping} }; + + if (@hump) { + my %hash = ( + nick => $hump[0], + hump => $self->{stats}->{humping}{$hump[0]}, + line => $self->_format_line($self->{stats}->{humpinglines}{$hump[0]}) + ); + + my $text = $self->_template_text('hump1', %hash); + + if ($self->{cfg}->{showhumpline}) { + my $exttext = $self->_template_text('humptext', %hash); + _html("$text
$exttext"); + } else { + _html("$text"); + } + } + + if (@hump >= 2) { + my %hash = ( + nick => $hump[1], + humped => $self->{stats}->{humping}{$hump[1]}, + line => $self->_format_line($self->{stats}->{humpinglines}{$hump[0]}) + ); + + my $text = $self->_template_text('hump2', %hash); + _html("
$text"); + } + _html(""); +} + sub _capspeople { # The ones who speak ALL CAPS. Index: pisg-0.70/modules/Pisg/Parser/Logfile.pm =================================================================== --- pisg-0.70.orig/modules/Pisg/Parser/Logfile.pm +++ pisg-0.70/modules/Pisg/Parser/Logfile.pm @ -479,6 +480,11 @@ sub _parse_file $stats->{lastvisited}{$nick} = $stats->{days}; $stats->{line_times}{$nick}[int($hour/6)]++; + if (index($saying, 'hump') > -1) { + $stats->{humping}{$nick}++; + push @{ $lines->{humpinglines}{$nick} }, $line; + } + if ($self->{violentwords_regexp} and $saying =~ /$self->{violentwords_regexp}/) { my $victim; unless ($victim = is_nick($2)) {