Explorar o código

Eggdrop logs were catching server mode changes, fixed

sbingner %!s(int64=25) %!d(string=hai) anos
pai
achega
52764dfeec
Modificáronse 1 ficheiros con 6 adicións e 4 borrados
  1. 6 4
      pisg.pl

+ 6 - 4
pisg.pl

@@ -673,10 +673,12 @@ sub parse_thirdline
                 $hash{newtopic} = $2;
                 $hash{newtopic} = $2;
 
 
             } elsif (($4.$5) eq 'modechange') {
             } 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') {
             } elsif ($5 eq 'joined') {
                 $hash{newjoin} = $3;
                 $hash{newjoin} = $3;