Minor nick-o-meter tweaks

This commit is contained in:
Pragmatic Software 2019-04-29 12:53:56 -07:00
parent e09751e0d2
commit 9c117509ed
1 changed files with 13 additions and 1 deletions

View File

@ -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 <nick>\n";
exit 1;