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
|
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)) {
|