From bc02854d155ca8978d856b0742682f4fffa8925e Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Fri, 26 Aug 2022 12:47:44 -0700 Subject: [PATCH] Update WordMorph - Ensure length of each step is correct - Add WordMorph to plugin_autoload --- data/plugin_autoload | 1 + lib/PBot/Plugin/WordMorph.pm | 2 +- lib/PBot/VERSION.pm | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/data/plugin_autoload b/data/plugin_autoload index 52986536..d1972513 100644 --- a/data/plugin_autoload +++ b/data/plugin_autoload @@ -20,4 +20,5 @@ TypoSub UrlTitles Weather Wolfram +WordMorph Wttr diff --git a/lib/PBot/Plugin/WordMorph.pm b/lib/PBot/Plugin/WordMorph.pm index 40c55813..a4519c55 100644 --- a/lib/PBot/Plugin/WordMorph.pm +++ b/lib/PBot/Plugin/WordMorph.pm @@ -212,7 +212,7 @@ sub wordmorph { return "I do not know this word `$word`."; } - if (distance($word, $last_word) != 1) { + if (distance($word, $last_word) != 1 || length($word) != length($last_word)) { return "Wrong. `$word` does not follow from `$last_word`."; } diff --git a/lib/PBot/VERSION.pm b/lib/PBot/VERSION.pm index ac0f7ba8..5c2231d8 100644 --- a/lib/PBot/VERSION.pm +++ b/lib/PBot/VERSION.pm @@ -25,7 +25,7 @@ use PBot::Imports; # These are set by the /misc/update_version script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 4576, + BUILD_REVISION => 4577, BUILD_DATE => "2022-08-26", };