Explorar o código

Add nickhistory option

Morten Brix Pedersen %!s(int64=24) %!d(string=hai) anos
pai
achega
48f842346a
Modificáronse 3 ficheiros con 6 adicións e 1 borrados
  1. 4 0
      docs/CONFIG-README
  2. 1 0
      modules/Pisg.pm
  3. 1 1
      modules/Pisg/HTMLGenerator.pm

+ 4 - 0
docs/CONFIG-README

@@ -306,6 +306,10 @@ urlhistory          Maximum number of URLs to show in 'most referenced URLs'
 wordhistory         Maximum number of words to show in 'Most used words'
                     (default: 10)
 
+nickhistory         Maximum number of nicks to show in 'Most referenced
+                    nicks'
+                    (default: 5)
+
 langfile            Filename of language file.
                     (default: lang.txt)
 

+ 1 - 0
modules/Pisg.pm

@@ -170,6 +170,7 @@ sub get_default_config_settings
         activenicks2 => 30,
         topichistory => 3,
         urlhistory => 5,
+        nickhistory => 5,
         wordhistory => 10,
         nicktracking => 0,
         charset => 'iso-8859-1',

+ 1 - 1
modules/Pisg/HTMLGenerator.pm

@@ -1500,7 +1500,7 @@ sub _mostreferencednicks
         _html("<td class=\"tdtop\"><b>" . $self->_template_text('numberuses') . "</b></td>");
         _html("<td class=\"tdtop\"><b>" . $self->_template_text('lastused') . "</b></td></tr>");
 
-        for(my $i = 0; $i < 5; $i++) {
+        for(my $i = 0; $i < $self->{cfg}->{nickhistory}; $i++) {
             last unless $i < $#popular;
             my $a = $i + 1;
             my $popular   = $popular[$i];