Przeglądaj źródła

Add nickhistory option

Morten Brix Pedersen 24 lat temu
rodzic
commit
48f842346a
3 zmienionych plików z 6 dodań i 1 usunięć
  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'
 wordhistory         Maximum number of words to show in 'Most used words'
                     (default: 10)
                     (default: 10)
 
 
+nickhistory         Maximum number of nicks to show in 'Most referenced
+                    nicks'
+                    (default: 5)
+
 langfile            Filename of language file.
 langfile            Filename of language file.
                     (default: lang.txt)
                     (default: lang.txt)
 
 

+ 1 - 0
modules/Pisg.pm

@@ -170,6 +170,7 @@ sub get_default_config_settings
         activenicks2 => 30,
         activenicks2 => 30,
         topichistory => 3,
         topichistory => 3,
         urlhistory => 5,
         urlhistory => 5,
+        nickhistory => 5,
         wordhistory => 10,
         wordhistory => 10,
         nicktracking => 0,
         nicktracking => 0,
         charset => 'iso-8859-1',
         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('numberuses') . "</b></td>");
         _html("<td class=\"tdtop\"><b>" . $self->_template_text('lastused') . "</b></td></tr>");
         _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;
             last unless $i < $#popular;
             my $a = $i + 1;
             my $a = $i + 1;
             my $popular   = $popular[$i];
             my $popular   = $popular[$i];