mirror of
https://github.com/pragma-/pbot.git
synced 2025-05-03 13:17:33 +02:00
Tweaks to nickometer module
This commit is contained in:
parent
a0b0cb8a74
commit
c1fa37f982
@ -13,8 +13,8 @@ use warnings;
|
|||||||
# These are set automatically by the build/commit script
|
# These are set automatically by the build/commit script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 561,
|
BUILD_REVISION => 562,
|
||||||
BUILD_DATE => "2014-04-30",
|
BUILD_DATE => "2014-05-01",
|
||||||
};
|
};
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
@ -38,12 +38,14 @@ sub nickometer ($) {
|
|||||||
'dood' => 500,
|
'dood' => 500,
|
||||||
'dude' => 500,
|
'dude' => 500,
|
||||||
'[l1](oo?|u)[sz]er' => 500,
|
'[l1](oo?|u)[sz]er' => 500,
|
||||||
'[l1]eet' => 500,
|
'[l1](ee|33)[t7]' => 500,
|
||||||
'e[l1]ite' => 500,
|
'e[l1]ite' => 500,
|
||||||
'[l1]ord' => 500,
|
'[l1]ord' => 500,
|
||||||
'pron' => 1000,
|
's[e3]xy' => 700,
|
||||||
'warez' => 1000,
|
'h[o0]rny' => 700,
|
||||||
'xx' => 100,
|
'pr[o0]n' => 1000,
|
||||||
|
'w[4a]r[e3]z' => 1000,
|
||||||
|
'xx' => 300,
|
||||||
'\[rkx]0' => 1000,
|
'\[rkx]0' => 1000,
|
||||||
'\0[rkx]' => 1000,
|
'\0[rkx]' => 1000,
|
||||||
);
|
);
|
||||||
@ -55,8 +57,9 @@ sub nickometer ($) {
|
|||||||
unless ($raw) {
|
unless ($raw) {
|
||||||
$nick =~ tr/023457+8/ozeasttb/;
|
$nick =~ tr/023457+8/ozeasttb/;
|
||||||
}
|
}
|
||||||
&punish($special_cost{$special}, "matched special case /$special_pattern/")
|
while($nick =~ /$special_pattern/ig) {
|
||||||
if $nick =~ /$special_pattern/i;
|
&punish($special_cost{$special}, "matched special case /$special_pattern/")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Allow Perl referencing
|
# Allow Perl referencing
|
||||||
@ -112,7 +115,7 @@ sub nickometer ($) {
|
|||||||
# Punish uppercase to lowercase shifts and vice-versa, modulo
|
# Punish uppercase to lowercase shifts and vice-versa, modulo
|
||||||
# exceptions above
|
# exceptions above
|
||||||
my $case_shifts = &case_shifts($orig_case);
|
my $case_shifts = &case_shifts($orig_case);
|
||||||
&punish(&slow_pow(9, $case_shifts),
|
&punish(&slow_pow(5, $case_shifts),
|
||||||
$case_shifts . ' case ' .
|
$case_shifts . ' case ' .
|
||||||
(($case_shifts == 1) ? 'shift' : 'shifts'))
|
(($case_shifts == 1) ? 'shift' : 'shifts'))
|
||||||
if ($case_shifts > 1 && /[A-Z]/);
|
if ($case_shifts > 1 && /[A-Z]/);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user