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

Eggdrop logs were catching server mode changes, fixed

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

+ 6 - 4
pisg.pl

@@ -673,10 +673,12 @@ sub parse_thirdline
                 $hash{newtopic} = $2;
 
             } elsif (($4.$5) eq 'modechange') {
-                $hash{newmode} = $6;
-                $7 =~ /^ .+ by ([\S]+)!.*/;
-                $hash{nick} = $1;
-                $hash{newmode} =~ s/^\'//;
+                my $newmode = $6;
+                if ($7 =~ /^ .+ by ([\S]+)!.*/) {
+                    $hash{nick} = $1;
+                    $newmode =~ s/^\'//;
+                    $hash{newmode} = $newmode;
+                } 
 
             } elsif ($5 eq 'joined') {
                 $hash{newjoin} = $3;