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

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
    * 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

+ 42 - 6
docs/pisg-doc.sgml

@@ -235,7 +235,7 @@
    </sect1>
    <sect1 id="including-config">
     <title>Including common settings for various channels</title>
-    
+
     <para>
     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
@@ -328,7 +328,7 @@
     The program will run and parse the logfiles you specified in the
     configuration file.
     </para>
-    
+
     <para>
     If you are using Linux and want run pisg
     automatically several times a day, then see the
@@ -361,7 +361,7 @@
     </para>
 
    </sect1>
-   
+
   </chapter>
   <chapter id="reference">
    <title>General pisg options</title>
@@ -640,7 +640,8 @@
     <para>
     <command>ColorScheme</command> is used to define the colorscheme used
     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>
     </refsect1>
     <refsect1>
@@ -1218,7 +1219,7 @@
     <title>Description</title>
     <para>
     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
     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.
@@ -1754,7 +1755,7 @@
     By enabling this option, pisg will add a section to the stats showing
     "Most Active Nicks By Hour" - also look at the
     <command>ShowMostActiveByHourGraph</command> and
-    <command>ActiveNicksByHour</command> settings. 
+    <command>ActiveNicksByHour</command> settings.
     </para>
     </refsect1>
     <refsect1>
@@ -2246,6 +2247,41 @@
     </refsect1>
     </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 *** -->
     <refentry id="TopicHistory">
 

+ 1 - 0
modules/Pisg.pm

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

+ 7 - 2
modules/Pisg/HTMLGenerator.pm

@@ -1905,8 +1905,13 @@ sub _mostnicks
             my $n = $nickcount > 1 ? $names1 : $names2;
 
             _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("</table>");