Explorar el Código

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

sbingner hace 25 años
padre
commit
ceef4a3bcc
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  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;
                 }