3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-24 11:42:35 +01:00

Interpreter: minor bugfix

This commit is contained in:
Pragmatic Software 2020-02-06 04:01:41 -08:00
parent f7d3c7b755
commit d38402754e

View File

@ -925,7 +925,8 @@ sub dehighlight_nicks {
my $zwsp = "\x{200b}";
foreach my $nick (keys %{$nicklist->{$channel}}) {
my $n = quotemeta $nicklist->{$channel}->{$nick}->{nick};
while ($line =~ m/($n)/gi) {
my $const_line = $line;
while ($const_line =~ m/($n)/gi) {
my $match = $1;
$match =~ s/^(.)/$1$zwsp/;
$line =~ s/$n/$match/i;