Selaa lähdekoodia

Fix voice/devoice detection with xchat format

Morten Brix Pedersen 24 vuotta sitten
vanhempi
sitoutus
1754d2a763
2 muutettua tiedostoa jossa 8 lisäystä ja 1 poistoa
  1. 1 0
      docs/Changelog
  2. 7 1
      modules/Pisg/Parser/Format/xchat.pm

+ 1 - 0
docs/Changelog

@@ -2,6 +2,7 @@ pisg (x.xx)
    * Add "ShowOnlyTop" option which can be used if you only want to have stats
    * Add "ShowOnlyTop" option which can be used if you only want to have stats
      for the users which appeared in the "Most Active Nicks" (top talkers)
      for the users which appeared in the "Most Active Nicks" (top talkers)
      section. (thanks, mincus)
      section. (thanks, mincus)
+   * Fix voice/devoice detection with xchat format.
 
 
 pisg (0.42) - Fri Nov, 1st 2002
 pisg (0.42) - Fri Nov, 1st 2002
    * ircII logfile support added (thanks, James Andrewartha)
    * ircII logfile support added (thanks, James Andrewartha)

+ 7 - 1
modules/Pisg/Parser/Format/xchat.pm

@@ -14,7 +14,7 @@ sub new
         cfg => $args{cfg},
         cfg => $args{cfg},
         normalline => '(\d+):\d+:\d+ <([^>\s]+)>\s+(.*)',
         normalline => '(\d+):\d+:\d+ <([^>\s]+)>\s+(.*)',
         actionline => '(\d+):\d+:\d+ (\*){1,}\s+(\S+) (.*)',
         actionline => '(\d+):\d+:\d+ (\*){1,}\s+(\S+) (.*)',
-        thirdline  => '(\d+):(\d+):\d+ .{1,}--\s+(\S+) (\S+) (\S+) (\S+) (\S+) (\S+) (.*)',
+        thirdline  => '(\d+):(\d+):\d+ .{1,}--\s+(\S+) (\S+) (\S+) (\S+) (\S+) ?(\S+)? ?(.*)?',
     };
     };
 
 
     bless($self, $type);
     bless($self, $type);
@@ -79,6 +79,12 @@ sub thirdline
         } elsif (($4.$5) eq 'removeschannel') {
         } elsif (($4.$5) eq 'removeschannel') {
             $hash{newmode} = '-o';
             $hash{newmode} = '-o';
 
 
+        } elsif (($4.$5) eq 'givesvoice') {
+            $hash{newmode} = '+v';
+
+        } elsif (($4.$5) eq 'removesvoice') {
+            $hash{newmode} = '-v';
+
         } elsif (($5.$6) eq 'hasjoined') {
         } elsif (($5.$6) eq 'hasjoined') {
             $hash{newjoin} = $1;
             $hash{newjoin} = $1;