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

What I believe to be a better fix to the nicktracking problem that Phil Gregory found -- it also gets the stats in checkname to correctly use the alias for the newnick

sbingner 24 лет назад
Родитель
Сommit
62a91d2403
1 измененных файлов с 3 добавлено и 4 удалено
  1. 3 4
      modules/Pisg/Parser/Logfile.pm

+ 3 - 4
modules/Pisg/Parser/Logfile.pm

@@ -387,10 +387,9 @@ sub _parse_file
                     $stats->{joins}{$nick}++;
                     $stats->{joins}{$nick}++;
 
 
                 } elsif (defined($newnick) and ($self->{cfg}->{nicktracking} == 1)) {
                 } elsif (defined($newnick) and ($self->{cfg}->{nicktracking} == 1)) {
-                    # Don't add an alias if new nick belongs to someone else.
-                    if (lc($newnick) eq lc(find_alias($newnick))) {
-                        add_alias($nick, $newnick);
-                    }
+                    # Resolve new nick to the correct alias (this will create a hard-alias if it is using a regex)
+                    $newnick = find_alias($newnick);
+                    add_alias($nick, $newnick);
                     checkname($nick, $newnick, $stats) if ($self->{cfg}->{showmostnicks});
                     checkname($nick, $newnick, $stats) if ($self->{cfg}->{showmostnicks});
                 }
                 }
             }
             }