Pārlūkot izejas kodu

Add mostnickshistory

Morten Brix Pedersen 24 gadi atpakaļ
vecāks
revīzija
81f44781be
4 mainītis faili ar 40 papildinājumiem un 1 dzēšanām
  1. 4 0
      docs/Changelog
  2. 34 0
      docs/pisg-doc.sgml
  3. 1 0
      modules/Pisg.pm
  4. 1 1
      modules/Pisg/HTMLGenerator.pm

+ 4 - 0
docs/Changelog

@@ -1,3 +1,7 @@
+pisg (?.??)
+   * 
+   * 
+
 pisg (0.36) - Fri Feb, 8th 2002
    * Many translation updates (thanks all)
    * Add new translation templates to translate the bottom of the stats page

+ 34 - 0
docs/pisg-doc.sgml

@@ -1789,6 +1789,40 @@
     </refsect1>
     </refentry>
 
+    <!-- *** MOSTNICKSHISTORY *** -->
+    <refentry id="mostnickshistory">
+
+    <refmeta> <refentrytitle>mostnickshistory</refentrytitle> </refmeta>
+
+    <refnamediv>
+    <refname>mostnickshistory</refname>
+    <refpurpose>maximum number of nicks to show in "most nicks"</refpurpose>
+    </refnamediv>
+
+    <refsynopsisdiv><programlisting>
+      <![CDATA[
+        <channel="#channel" logfile="channel.log">
+         format = "mIRC"
+         mostnickshistory = "2"
+        </channel>
+
+        <set mostnickshistory="10">
+      ]]>
+    </programlisting></refsynopsisdiv>
+
+    <refsect1>
+    <title>Description</title>
+    <para>
+    With this option you can define how many nicks you want to appear in
+    the "Most used nicks" section.
+    </para>
+    </refsect1>
+    <refsect1>
+    <title>Default</title>
+    <para> 5 </para>
+    </refsect1>
+    </refentry>
+
     <!-- *** TOPICHISTORY *** -->
     <refentry id="topichistory">
 

+ 1 - 0
modules/Pisg.pm

@@ -173,6 +173,7 @@ sub get_default_config_settings
         urlhistory => 5,
         nickhistory => 5,
         wordhistory => 10,
+        mostnickshistory => 5,
         nicktracking => 0,
         charset => 'iso-8859-1',
 

+ 1 - 1
modules/Pisg/HTMLGenerator.pm

@@ -1689,7 +1689,7 @@ sub _mostnicks
         _html("<td>&nbsp;</td><td class=\"tdtop\"><b>$nick_txt</b></td>");
         _html("<td class=\"tdtop\"><b>$names_txt</b></td></tr>");
 
-        for(my $i = 0; $i < 5; $i++) {
+        for(my $i = 0; $i < $self->{cfg}->{mostnickshistory}; $i++) {
             last unless $i < @sortnicks;
             my $nickcount = scalar(@{ $self->{stats}->{nicks}->{$sortnicks[$i]} });
             my $nickused = join(", ", @{ $self->{stats}->{nicks}->{$sortnicks[$i]} });