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

Fix topic parsing bug in eggdrop (SF tracker #739090 by flashcode)

Christoph Berg 22 лет назад
Родитель
Сommit
bf5f968376
2 измененных файлов с 6 добавлено и 4 удалено
  1. 3 1
      docs/Changelog
  2. 3 3
      modules/Pisg/Parser/Format/eggdrop.pm

+ 3 - 1
docs/Changelog

@@ -4,7 +4,9 @@ pisg (0.61) - ??
    * Fix & conversion.
    * More nick sanitizing.
    * Remove whitespace around user pictures, border="0", title.
-   * New "mIRC6hack" format to work around braindead mIRC6 logging.
+   * Formats:
+     + New "mIRC6hack" format to work around braindead mIRC6 logging.
+     + Fix topic parsing bug in eggdrop (SF tracker #739090 by flashcode).
    * docs/:
      + Nicer Makefile.
      + Write a single HTML file.

+ 3 - 3
modules/Pisg/Parser/Format/eggdrop.pm

@@ -71,9 +71,9 @@ sub thirdline
             $hash{kicker} = $1;
 
         } elsif ($3 eq 'Topic') {
-            $7 =~ /^ by ([\S]+)![\S]+: (.*)/;
-            $hash{nick} = $1;
-            $hash{newtopic} = $2;
+            $7 =~ /^ by (\S*)!(\S+): (.*)/;
+            $hash{nick} = $1 || $2; # $1 might be empty if topic is reset by server
+            $hash{newtopic} = $3;
 
         } elsif (($4.$5) eq 'modechange') {
             my $newmode = $6;