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

Fixed Bug with mass-ops/mass-deops.
First Bugfix only for grufti-format (cause I have no other ones ;)

doomshammer 25 лет назад
Родитель
Сommit
a837938021
1 измененных файлов с 13 добавлено и 2 удалено
  1. 13 2
      pisg.pl

+ 13 - 2
pisg.pl

@@ -727,8 +727,19 @@ sub parse_thirdline
                 $hash{newtopic} = $9;
 
             } elsif (($4.$5) eq 'modechange') {
-                $hash{newmode} = substr($6, 1);
-                $hash{nick} = substr($9, 1);
+				my $mode = $6;
+				my $kicker = $9;
+				if($mode =~ /([+-]o[ov])(\S+)(.*)/) {
+					my $modes = $1.$2;
+					$modes =~ s/v//g;
+					$hash{newmode} = $modes;
+					if($kicker =~ /(.*)' by (\S+)/) {
+						$hash{nick} = $2;
+					}
+				} else {
+	                $hash{newmode} = substr($6, 1);
+    	            $hash{nick} = substr($9, 1);
+				}
 
             } elsif ($5 eq 'joined') {
                 $hash{newjoin} = $1;