diff options
Diffstat (limited to 'private/net-irc/pisg/files/pisg-0.70-SeJo-humping.patch')
-rw-r--r-- | private/net-irc/pisg/files/pisg-0.70-SeJo-humping.patch | 100 |
1 files changed, 0 insertions, 100 deletions
diff --git a/private/net-irc/pisg/files/pisg-0.70-SeJo-humping.patch b/private/net-irc/pisg/files/pisg-0.70-SeJo-humping.patch deleted file mode 100644 index 2bee3d2..0000000 --- a/private/net-irc/pisg/files/pisg-0.70-SeJo-humping.patch +++ /dev/null @@ -1,100 +0,0 @@ -Index: pisg-0.70/lang.txt -=================================================================== ---- pisg-0.70.orig/lang.txt -+++ pisg-0.70/lang.txt -@@ -87,6 +87,10 @@ allcaps2 = "<b>[:nick]</b> just forgot t - allcaps3 = "Everybody had their shift-key under control. :)" - allcapstext = "<b>For example, like this:</b><br /> [:line]" - -+hump1 = "Looks like <b>[:nick]</b> hasn't get layed in the last couple of weeks. [:He:She:] humped others <b>[:hump] times</b>." -+hump2 = "<b>[:nick] also needs to get layed. [:He:She:] humped others <b>[:hump] times</b>." -+humptext = "<b>See for yourself: </b><br /> [:line]" -+ - violent1 = "<b>[:nick]</b> is a very aggressive person. [:He:She:] attacked others <b>[:attacks]</b> times." - violent2 = "<b>[:nick]</b> can't control [:his:her:] aggressions, either. [:He:She:] picked on others <b>[:attacks]</b> 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("<tr><td class=\"hicell\">$text<br /><span class=\"small\">$exttext</span>"); -+ } else { -+ _html("<tr><td class=\"hicell\">$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("<br /><span class=\"small\">$text</span>"); -+ } -+ _html("</td></tr>"); -+} -+ - 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)) { |