diff --git a/blockbot/blockbot.php b/blockbot/blockbot.php index 10327edf..91657ef0 100644 --- a/blockbot/blockbot.php +++ b/blockbot/blockbot.php @@ -30,6 +30,7 @@ function blockbot_addon_admin(string &$o) '$submit' => DI::l10n()->t('Save Settings'), '$good_crawlers' => ['good_crawlers', DI::l10n()->t('Allow "good" crawlers'), DI::config()->get('blockbot', 'good_crawlers'), DI::l10n()->t("Don't block fediverse crawlers, relay servers and other bots with good purposes.")], '$block_gab' => ['block_gab', DI::l10n()->t('Block GabSocial'), DI::config()->get('blockbot', 'block_gab'), DI::l10n()->t('Block the software GabSocial. This will block every access for that software. You can block dedicated gab instances in the blocklist settings in the admin section.')], + '$block_gpt' => ['block_gpt', DI::l10n()->t('Block ChatGPT'), DI::config()->get('blockbot', 'block_gpt'), DI::l10n()->t('Block the ChatGPT crawler. This will block every access for that software.')], '$training' => ['training', DI::l10n()->t('Training mode'), DI::config()->get('blockbot', 'training'), DI::l10n()->t("Activates the training mode. This is only meant for developing purposes. Don't activate this on a production machine. This can cut communication with some systems.")], ]); } @@ -38,6 +39,7 @@ function blockbot_addon_admin_post() { DI::config()->set('blockbot', 'good_crawlers', $_POST['good_crawlers'] ?? false); DI::config()->set('blockbot', 'block_gab', $_POST['block_gab'] ?? false); + DI::config()->set('blockbot', 'block_gpt', $_POST['block_gpt'] ?? false); DI::config()->set('blockbot', 'training', $_POST['training'] ?? false); } @@ -96,6 +98,9 @@ function blockbot_init_1() if (DI::config()->get('blockbot', 'block_gab')) { $agents[] = 'GabSocial/'; } + if (DI::config()->get('blockbot', 'block_gpt')) { + $agents[] = 'GPTBot/'; + } foreach ($agents as $agent) { if (stristr($_SERVER['HTTP_USER_AGENT'], $agent)) { diff --git a/blockbot/lang/C/messages.po b/blockbot/lang/C/messages.po index 6f30e845..94a2b032 100644 --- a/blockbot/lang/C/messages.po +++ b/blockbot/lang/C/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-13 06:17+0000\n" +"POT-Creation-Date: 2023-08-09 07:10+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -43,11 +43,20 @@ msgid "" msgstr "" #: blockbot.php:33 -msgid "Training mode" +msgid "Block ChatGPT" msgstr "" #: blockbot.php:33 msgid "" +"Block the ChatGPT crawler. This will block every access for that software." +msgstr "" + +#: blockbot.php:34 +msgid "Training mode" +msgstr "" + +#: blockbot.php:34 +msgid "" "Activates the training mode. This is only meant for developing purposes. " "Don't activate this on a production machine. This can cut communication with " "some systems."