From 1886aa13b44b8bccbd9ce91dcbcb85ab07b6f2b9 Mon Sep 17 00:00:00 2001 From: Janik Kleinhoff Date: Sat, 24 Dec 2016 12:51:06 +0000 Subject: 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. --- lib/ASM/Classes.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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; } -- cgit v1.2.3