Christoph Berg 21 лет назад
Родитель
Сommit
bf4f2479c0
2 измененных файлов с 9 добавлено и 9 удалено
  1. 2 2
      docs/Changelog
  2. 7 7
      modules/Pisg/Parser/Format/psybnc.pm

+ 2 - 2
docs/Changelog

@@ -4,8 +4,8 @@ pisg (0.67) - ??
        ChartsRegexp.
        ChartsRegexp.
      + Documentation: Local options override global ones, not vice-versa.
      + Documentation: Local options override global ones, not vice-versa.
      + Notes on using mIRC.
      + Notes on using mIRC.
-     + psybnc.pm: Fix ACTION pattern, require PRIVMSG on normal lines
-       (SF #1251680).
+     + psybnc.pm: Fix ACTION pattern, require PRIVMSG on normal lines,
+       fix thirdline pattern (SF #1251680).
    Torbjörn Svensson:
    Torbjörn Svensson:
      + Added support for multiple channels in config with the same name.
      + Added support for multiple channels in config with the same name.
        Even multiple channel directives for the very same channel are
        Even multiple channel directives for the very same channel are

+ 7 - 7
modules/Pisg/Parser/Format/psybnc.pm

@@ -12,7 +12,7 @@ sub new
         cfg => $args{cfg},
         cfg => $args{cfg},
         normalline => '^\d+-\d+-\d+-(\d+)-\d+-\d+:[^:]+::([^!]+)[^:]+ PRIVMSG [^:]+:([^\001]+)',
         normalline => '^\d+-\d+-\d+-(\d+)-\d+-\d+:[^:]+::([^!]+)[^:]+ PRIVMSG [^:]+:([^\001]+)',
         actionline => '^\d+-\d+-\d+-(\d+)-\d+-\d+:[^:]+::([^!]+)[^:]+:\001ACTION ([^\001]*)',
         actionline => '^\d+-\d+-\d+-(\d+)-\d+-\d+:[^:]+::([^!]+)[^:]+:\001ACTION ([^\001]*)',
-        thirdline  => '^\d+-\d+-\d+-(\d+)-(\d+)-\d+:[^:]+::([^!]+)[^ ]+ (\w+) (.*)',
+        thirdline  => '^\d+-\d+-\d+-(\d+)-(\d+)-\d+:[^:]+::([^! .]+)[^ ]* (\w+) [#\w]+ :?((\S*)\s*(.*))',
     };
     };
 
 
     bless($self, $type);
     bless($self, $type);
@@ -64,22 +64,22 @@ sub thirdline
         $hash{min}  = $2;
         $hash{min}  = $2;
         $hash{nick} = $3;
         $hash{nick} = $3;
 
 
-        my @arr = split(" ", $5);
         if ($4 eq 'KICK') {
         if ($4 eq 'KICK') {
             $hash{kicker} = $hash{nick};
             $hash{kicker} = $hash{nick};
-            $hash{nick} = $arr[1];
+            $hash{nick} = $6;
 
 
         } elsif ($4 eq 'TOPIC') {
         } elsif ($4 eq 'TOPIC') {
-            $hash{newtopic} = join(" ", @arr[1..@arr]);
+            print "TOPIC\n";
+            $hash{newtopic} = $5;
 
 
         } elsif ($4 eq 'MODE') {
         } elsif ($4 eq 'MODE') {
-            $hash{newmode} = $arr[1];
+            $hash{newmode} = $5;
 
 
         } elsif ($4 eq 'JOIN') {
         } elsif ($4 eq 'JOIN') {
             $hash{newjoin} = $3;
             $hash{newjoin} = $3;
 
 
-        } elsif ($4 eq 'NICK') {
-            $hash{newnick} = $arr[1];;
+        } elsif ($4 eq 'NICK') { # does this work?
+            $hash{newnick} = $6;
         }
         }
 
 
         return \%hash;
         return \%hash;