I tested this code with the non event prefixed on join and the raw events with both a nickname of 2 characters and a nickname with more than 30% of uppercase and it triggered a badnick_alias alias I had created to test the code. Feel free to join the channel in my signature if you want further help as there could be any kind of reason as to why it's not working for you, and figuring it out on a forum is more complicated than on IRC.
I decided to split the addon. So maybe I'll make 2 differents (one for upper and one for letters).
This is the one if letters < 3:
on *:JOIN:#channel:{
if (($len($nick) < 3) { /badnick_alias $chan $nick }
}
on *:nick:if (($len($nick) < 3)) badnick_alias #channel $nick
alias badnick_alias {
var %chan $1 , %nick $2
if (%nick !ison %chan) return
if (!$3) {
notice %nick FIRST WARN
.timer 1 30 badnick_alias %chan %nick 30
.timer 1 45 badnick_alias %chan %nick 45
.timer 1 60 badnick_alias %chan %nick 60
return
}
elseif ($3 == 30) notice %nick SECOND WARN
elseif ($3 == 45) notice %nick LAST WARN
elseif ($3 == 60) kick %chan %nick KICK
}
And doesn't work.
I forgot to tell: mIRC is 7.78 and no other addons loaded (so no conflict)