From 9c117509ed98afa409afa074b7b16c50c54cbe19 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Mon, 29 Apr 2019 12:53:56 -0700 Subject: [PATCH] Minor nick-o-meter tweaks --- modules/nickometer.pl | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/nickometer.pl b/modules/nickometer.pl index b5258e3b..ec98f3f6 100755 --- a/modules/nickometer.pl +++ b/modules/nickometer.pl @@ -25,7 +25,7 @@ sub nickometer ($) { # Deal with special cases (precede with \ to prevent de-k3wlt0k) my %special_cost = ( - '__' => 200, + '_' => 50, '69' => 500, 'dea?th' => 500, 'dark' => 400, @@ -61,6 +61,10 @@ sub nickometer ($) { &punish($special_cost{$special}, "matched special case /$special_pattern/") } } + + if ($_ =~ m/^.$/) { + &punish(1000, "single letter nick"); + } while(m/[A-Z]([^A-Z]+)\b/g) { &punish(250, "length 1 between capitals") if length $1 == 1; @@ -211,6 +215,14 @@ sub punish ($$) { my $nick = $ARGV[0]; +if ($nick =~ s/ verbose$//) { + $verbose = 1; +} + +if ($ARGV[1] and $ARGV[1] eq 'verbose') { + $verbose = 1; +} + if(not defined $nick) { print "Usage: nickometer \n"; exit 1;