Originally Posted by Wims
I misunderstood, you may keep the current code for when YOU (the bot) rejoin the channel to do a one time scan on all nick.
You then need to add an on join event which trigger for others only which would be a copy of the on nick event:

Code
on @:join:#alessandra:if (($len($nick) < 3) || ($calc($regex($nick,/[A-Z]/g) * 100 / $len($nick)) > 30)) badnick_alias #alessandra $nick
The @ event prefix should ensure that the event only triggers for others (you are not op when you join)

No need brackets?

Code
on @:join:#alessandra: {
if (($len($nick) < 3) || ($calc($regex($nick,/[A-Z]/g) * 100 / $len($nick)) > 30)) badnick_alias #alessandra $nick
}