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

Correct bug where mIRC format was not seeing topic changes.

Also corrects bug introduced with my use of an array -- it wasn't printing all of the data for the topic (yes, the topic that was already not being seen at all... but it woulda still been jacked if I didn't fix that too)
sbingner 24 лет назад
Родитель
Сommit
a45a63cec5
1 измененных файлов с 5 добавлено и 3 удалено
  1. 5 3
      modules/Pisg/Parser/Format/mIRC.pm

+ 5 - 3
modules/Pisg/Parser/Format/mIRC.pm

@@ -69,11 +69,13 @@ sub thirdline
         if ($#line >= 4 && ($line[1].$line[2]) eq 'waskicked') {
             $hash{kicker} = $line[4];
 
-        } elsif ($#line >= 5 && $line[3] eq 'changes') {
-            $hash{newtopic} = "$line[4] $line[5]";
+        } elsif ($#line >= 4 && ($line[1] eq 'changes')) {
+            $hash{newtopic} = join(' ', @line[4..$#line]);
+            $hash{newtopic} =~ s/^'//;
+            $hash{newtopic} =~ s/'$//;
 
         } elsif ($#line >= 3 && ($line[1].$line[2]) eq 'setsmode:') {
-            $hash{newmode} = $line[3];
+            $hash{newmode} = join(' ', @line[3..$#line]);
 
         } elsif ($#line >= 3 && ($line[2].$line[3]) eq 'hasjoined') {
             $hash{newjoin} = $line[0];