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

Don't match more than we need to in bxlog format, and dont set extra variables... should be more efficient

sbingner 25 лет назад
Родитель
Сommit
ceef4a3bcc
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      pisg.pl

+ 3 - 3
pisg.pl

@@ -777,13 +777,13 @@ sub parse_thirdline
             $hash{min} = $2;
 
             if ($3 eq '<') {
-                if  ($4 =~ /^([^!]+)!([\S+]) was kicked off (\S+) by ([^!]+)!(\S+) \(([^)]+)\)$/) {
-                    $hash{kicker} = $4;
+                if  ($4 =~ /^([^!]+)!\S+ was kicked off \S+ by ([^!]+)!/) {
+                    $hash{kicker} = $2;
                     $hash{nick} = $1;
                 }
 
             } elsif ($3 eq '>') {
-                if ($4 =~ /^([^!])+!(\S+) has joined (\S+)$/) {
+                if ($4 =~ /^([^!])+!\S+ has joined \S+$/) {
                     $hash{nick} = $1;
                     $hash{newjoin} = $1;
                 }