From 34655f82b91189ed52bacc7d156df441cc0063a0 Mon Sep 17 00:00:00 2001 From: Daniel Winzen Date: Fri, 5 Sep 2025 10:36:27 +0200 Subject: [PATCH] Adds captchas with a TrueType font on a plaid pattern, optionally with spurious characters. --- chat.php | 44 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/chat.php b/chat.php index 659a282..88495d7 100644 --- a/chat.php +++ b/chat.php @@ -672,7 +672,7 @@ function send_captcha(): void echo ''; if ($difficulty===4) { echo _('Type the characters connected by dotted lines:'); - } elseif ($difficulty===7 || $difficulty===8) { + } elseif ($difficulty===7 || $difficulty===8 || $difficulty===10) { echo _('Type the five largest characters:'); } else { echo _('Type the characters in the image:'); @@ -813,7 +813,7 @@ function send_captcha(): void imageline($im, $chars[$i]['x']+ $fontwidth / 2, $chars[$i]['y']+ $fontheight / 2, $chars[$i+1]['x']+4, $chars[$i+1]['y']+8, IMG_COLOR_STYLED); } echo 'CAPTCHA'._('TrueType on plaid background').''; + echo ''; echo ''; } echo '';