From af447c2614ad4b0226c9597fc9d7e9abb0ad2211 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Fri, 2 May 2014 03:57:19 +0000 Subject: [PATCH] More nickometer tweaks --- PBot/VERSION.pm | 2 +- modules/nickometer.pl | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index a5b8e5ed..28daf378 100644 --- a/PBot/VERSION.pm +++ b/PBot/VERSION.pm @@ -13,7 +13,7 @@ use warnings; # These are set automatically by the build/commit script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 563, + BUILD_REVISION => 564, BUILD_DATE => "2014-05-01", }; diff --git a/modules/nickometer.pl b/modules/nickometer.pl index bc5674d5..e824784c 100755 --- a/modules/nickometer.pl +++ b/modules/nickometer.pl @@ -25,6 +25,7 @@ sub nickometer ($) { # Deal with special cases (precede with \ to prevent de-k3wlt0k) my %special_cost = ( + '__' => 200, '69' => 500, 'dea?th' => 500, 'dark' => 400, @@ -62,6 +63,10 @@ sub nickometer ($) { } } + while(m/[A-Z]([^A-Z]+)\b/g) { + &punish(250, "length 1 between capitals") if length $1 == 1; + } + # Allow Perl referencing s/^\\([A-Za-z])/$1/; @@ -139,7 +144,7 @@ sub nickometer ($) { $remains =~ tr/a-zA-Z0-9//d; my $remains_length = length($remains); - &punish(50 * $remains_length + &slow_pow(9, $remains_length), + &punish(150 * $remains_length + &slow_pow(9, $remains_length), $remains_length . ' extraneous ' . (($remains_length == 1) ? 'symbol' : 'symbols')) if $remains;