Просмотр исходного кода

Add MostNicksVerbose option by David Lynch

Morten Brix Pedersen 23 лет назад
Родитель
Сommit
badb64011a
4 измененных файлов с 56 добавлено и 8 удалено
  1. 6 0
      docs/Changelog
  2. 42 6
      docs/pisg-doc.sgml
  3. 1 0
      modules/Pisg.pm
  4. 7 2
      modules/Pisg/HTMLGenerator.pm

+ 6 - 0
docs/Changelog

@@ -1,3 +1,9 @@
+pisg (x.xx)
+   * Add new option, MostNicksVerbose (enabled by default). When this option
+     is disabled, instead of having a full list of nicknames in "most
+     referenced nicks", only the number of nicks used will be listed. (thanks,
+     David Lynch)
+
 pisg (0.47) - Wed Feb, 26th 2003
 pisg (0.47) - Wed Feb, 26th 2003
    * Fix bug where multiple URLs in same line would have save name as first URL
    * Fix bug where multiple URLs in same line would have save name as first URL
      (EG: <A HREF="http://www.google.com">http://www.yahoo.com</A> if yahoo
      (EG: <A HREF="http://www.google.com">http://www.yahoo.com</A> if yahoo

+ 42 - 6
docs/pisg-doc.sgml

@@ -235,7 +235,7 @@
    </sect1>
    </sect1>
    <sect1 id="including-config">
    <sect1 id="including-config">
     <title>Including common settings for various channels</title>
     <title>Including common settings for various channels</title>
-    
+
     <para>
     <para>
     If you have, for example, more than one channel, where the users are the
     If you have, for example, more than one channel, where the users are the
     same, or you don't want to maintain more than one user file, you can use
     same, or you don't want to maintain more than one user file, you can use
@@ -328,7 +328,7 @@
     The program will run and parse the logfiles you specified in the
     The program will run and parse the logfiles you specified in the
     configuration file.
     configuration file.
     </para>
     </para>
-    
+
     <para>
     <para>
     If you are using Linux and want run pisg
     If you are using Linux and want run pisg
     automatically several times a day, then see the
     automatically several times a day, then see the
@@ -361,7 +361,7 @@
     </para>
     </para>
 
 
    </sect1>
    </sect1>
-   
+
   </chapter>
   </chapter>
   <chapter id="reference">
   <chapter id="reference">
    <title>General pisg options</title>
    <title>General pisg options</title>
@@ -640,7 +640,8 @@
     <para>
     <para>
     <command>ColorScheme</command> is used to define the colorscheme used
     <command>ColorScheme</command> is used to define the colorscheme used
     for the statistics page. Actually it's the CSS file being included.
     for the statistics page. Actually it's the CSS file being included.
-    Available options are: default, darkgalaxy.
+    Available options are: default, darkgalaxy, darkred, justgrey, ocean,
+    softgreen.
     </para>
     </para>
     </refsect1>
     </refsect1>
     <refsect1>
     <refsect1>
@@ -1218,7 +1219,7 @@
     <title>Description</title>
     <title>Description</title>
     <para>
     <para>
     The default behaviour is to add a column to the "Most Active Nicks"
     The default behaviour is to add a column to the "Most Active Nicks"
-    section displaying a fancy linetimebar to show when a user was active. 
+    section displaying a fancy linetimebar to show when a user was active.
     With this option it can be done similarly to mIRCStats does it and like
     With this option it can be done similarly to mIRCStats does it and like
     the ShowLineTime option, but using words instead of lines; that is, by
     the ShowLineTime option, but using words instead of lines; that is, by
     putting that timebar next to the number of words, in the same column.
     putting that timebar next to the number of words, in the same column.
@@ -1754,7 +1755,7 @@
     By enabling this option, pisg will add a section to the stats showing
     By enabling this option, pisg will add a section to the stats showing
     "Most Active Nicks By Hour" - also look at the
     "Most Active Nicks By Hour" - also look at the
     <command>ShowMostActiveByHourGraph</command> and
     <command>ShowMostActiveByHourGraph</command> and
-    <command>ActiveNicksByHour</command> settings. 
+    <command>ActiveNicksByHour</command> settings.
     </para>
     </para>
     </refsect1>
     </refsect1>
     <refsect1>
     <refsect1>
@@ -2246,6 +2247,41 @@
     </refsect1>
     </refsect1>
     </refentry>
     </refentry>
 
 
+    <!-- *** MOSTNICKSVERBOSE *** -->
+    <refentry id="MostNicksVerbose">
+
+    <refmeta> <refentrytitle>MostNicksVerbose</refentrytitle> </refmeta>
+
+    <refnamediv>
+    <refname>MostNicksVerbose</refname>
+    <refpurpose>show nicks used in "most nicks"</refpurpose>
+    </refnamediv>
+
+    <refsynopsisdiv><programlisting>
+      <![CDATA[
+        <channel="#channel">
+         Logfile = "channel.log"
+         Format = "mIRC"
+         MostNicksVerbose = "0"
+        </channel>
+
+        <set MostNicksVerbose="1">
+      ]]>
+    </programlisting></refsynopsisdiv>
+
+    <refsect1>
+    <title>Description</title>
+    <para>
+    By disabling this option you can stop pisg from displaying all the nicks
+    a user has had in the "Most used nicks" section.
+    </para>
+    </refsect1>
+    <refsect1>
+    <title>Default</title>
+    <para> 1 </para>
+    </refsect1>
+    </refentry>
+
     <!-- *** TOPICHISTORY *** -->
     <!-- *** TOPICHISTORY *** -->
     <refentry id="TopicHistory">
     <refentry id="TopicHistory">
 
 

+ 1 - 0
modules/Pisg.pm

@@ -175,6 +175,7 @@ sub get_default_config_settings
         nickhistory => 5,
         nickhistory => 5,
         wordhistory => 10,
         wordhistory => 10,
         mostnickshistory => 5,
         mostnickshistory => 5,
+        mostnicksverbose => 1,
         nicktracking => 0,
         nicktracking => 0,
         charset => 'iso-8859-1',
         charset => 'iso-8859-1',
         irciinick => 'maintainer',
         irciinick => 'maintainer',

+ 7 - 2
modules/Pisg/HTMLGenerator.pm

@@ -1905,8 +1905,13 @@ sub _mostnicks
             my $n = $nickcount > 1 ? $names1 : $names2;
             my $n = $nickcount > 1 ? $names1 : $names2;
 
 
             _html("<tr><td class=\"$class\">$a</td>");
             _html("<tr><td class=\"$class\">$a</td>");
-            _html("<td class=\"hicell10\">$sortnicks[$i]<br />($nickcount $n)</td>");
-            _html("<td class=\"hicell10\" valign='top'>$nickused</td>");
+            if ($self->{cfg}->{mostnicksverbose}) { 
+                _html("<td class=\"hicell10\">$sortnicks[$i]<br />($nickcount $n)</td>");
+                _html("<td class=\"hicell10\" valign='top'>$nickused</td>");
+            } else {
+                _html("<td class=\"hicell10\">$sortnicks[$i]</td>");
+                _html("<td class=\"hicell10\" valign='top'>$nickcount $n</td>");
+            }
             _html("</tr>");
             _html("</tr>");
         }
         }
         _html("</table>");
         _html("</table>");