Browse Source

Fixed xchat2 "Topic for #chan is" parsing and added logsample

Christoph Berg 22 years ago
parent
commit
adf62fd0f1
2 changed files with 7 additions and 6 deletions
  1. 1 0
      docs/Changelog
  2. 6 6
      modules/Pisg/Parser/Format/xchat.pm

+ 1 - 0
docs/Changelog

@@ -9,6 +9,7 @@ pisg (0.60) - ??
    German strings.
    German strings.
    * Updated Norwegian translation (thanks, Andreas Blaafladt).
    * Updated Norwegian translation (thanks, Andreas Blaafladt).
    * Updated Dutch translation (thanks, Tiniduske).
    * Updated Dutch translation (thanks, Tiniduske).
+   * Fixed xchat2 "Topic for #chan is" parsing and added logsample.
    Changes by Morten Brix Pedersen:
    Changes by Morten Brix Pedersen:
    * Renamed the Danish translation to its correct abbreviation, DA instead
    * Renamed the Danish translation to its correct abbreviation, DA instead
    of DK.
    of DK.

+ 6 - 6
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+ [<-]-[->]\s+(\S+) (\S+) (\S+) (\S+) (\S+) ?(\S+)? ?(.*)?',
+        thirdline  => '(\d+):(\d+):\d+ [<-]-[->]\s+(\S+) (\S+) (\S+) (\S+) ((\S+)\s*(\S+)?\s*(.*)?)',
     };
     };
 
 
     bless($self, $type);
     bless($self, $type);
@@ -71,7 +71,7 @@ sub thirdline
             $hash{nick} = $6;
             $hash{nick} = $6;
 
 
         } elsif (($4.$5) eq 'haschanged') {
         } elsif (($4.$5) eq 'haschanged') {
-            $hash{newtopic} = $9;
+            $hash{newtopic} = $10;
 
 
         } elsif (($4.$5.$6) eq 'giveschanneloperator') {
         } elsif (($4.$5.$6) eq 'giveschanneloperator') {
             $hash{newmode} = '+o';
             $hash{newmode} = '+o';
@@ -95,14 +95,14 @@ sub thirdline
             $hash{newjoin} = $1;
             $hash{newjoin} = $1;
 
 
         } elsif (($5.$6) eq 'nowknown') {
         } elsif (($5.$6) eq 'nowknown') {
-            $hash{newnick} = $8;
+            $hash{newnick} = $9;
 
 
         } elsif (($3.$4.$6) eq 'Topicforis') {
         } elsif (($3.$4.$6) eq 'Topicforis') {
-            $self->{topictemp} = $9;
-            $hash{newtopic} = $9;
+            $self->{topictemp} = $7;
+            $hash{newtopic} = $7;
 
 
         } elsif (($3.$4.$6) eq 'Topicforset') {
         } elsif (($3.$4.$6) eq 'Topicforset') {
-            $hash{nick} = $8;
+            $hash{nick} = $9;
             $hash{newtopic} =  $self->{topictemp};
             $hash{newtopic} =  $self->{topictemp};
 
 
         }
         }