summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLibravatarJanik Kleinhoff <ilbelkyr@shalture.org>2016-12-24 12:51:06 +0000
committerLibravatarJanik Kleinhoff <ilbelkyr@shalture.org>2016-12-24 12:51:06 +0000
commit1886aa13b44b8bccbd9ce91dcbcb85ab07b6f2b9 (patch)
tree45531eb144bdd82bb037145d3cc8a1751e8e0ff4 /lib
parent239a92e87b904e259aec354930bb50ac7371d001 (diff)
asciiflood: Check for Unicode "letters"
We used to test for /[a-zA-Z0-9]/ here, which obviously won't work for languages that don't normally use those characters. Test for something Unicode roughly considers a "letter" instead (this includes ideographic characters). Fixes T15.
Diffstat (limited to 'lib')
-rw-r--r--lib/ASM/Classes.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ASM/Classes.pm b/lib/ASM/Classes.pm
index bee81e1..5f9c6ad 100644
--- a/lib/ASM/Classes.pm
+++ b/lib/ASM/Classes.pm
@@ -268,7 +268,7 @@ sub asciiflood {
my ($chk, $id, $event, $chan, $rev) = @_;
my @cut = split(/:/, $chk->{content});
return 0 if (length($event->{args}->[0]) < $cut[0]);
- return 0 if ($event->{args}->[0] =~ /[A-Za-z0-9]/);
+ return 0 if ($event->{args}->[0] =~ /\pL/);
return 1 if ( flood_add( $chan, $id, $event->{host}, int($cut[2]) ) == int($cut[1]) );
return 0;
}