Browse Source

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

sbingner 25 năm trước cách đây
mục cha
commit
ceef4a3bcc
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  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;
                 }