mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-23 04:19:27 +01:00
Interpreter: preserve case of dehighlight
This commit is contained in:
parent
c3369f7bea
commit
c7c0b49515
@ -925,9 +925,11 @@ sub dehighlight_nicks {
|
|||||||
my $zwsp = "\x{200b}";
|
my $zwsp = "\x{200b}";
|
||||||
foreach my $nick (keys %{$nicklist->{$channel}}) {
|
foreach my $nick (keys %{$nicklist->{$channel}}) {
|
||||||
my $n = quotemeta $nicklist->{$channel}->{$nick}->{nick};
|
my $n = quotemeta $nicklist->{$channel}->{$nick}->{nick};
|
||||||
my $n_nh = $nicklist->{$channel}->{$nick}->{nick};
|
while ($line =~ m/($n)/gi) {
|
||||||
$n_nh =~ s/^(.)/$1$zwsp/;
|
my $match = $1;
|
||||||
$line =~ s/$n/$n_nh/gi;
|
$match =~ s/^(.)/$1$zwsp/;
|
||||||
|
$line =~ s/$n/$match/i;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $line;
|
return $line;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user