this snippet\'s poorly written.. you\'ve put \'#chatplaza\' where it should have been \'$chan\', and used a lot of on text events that are not that efficient.
for example, in the so-called \'anti-spamming part\', you check if \'www\' is the first part of a message, if the spammer starts with anything other than www (even a control char, such as bold, color etc), it won\'t set-off, hence rendering your \'anti-spam part\' useless. same thing for \'assault\'.
I myself would rather use level-based access to important commands
/help /auser
/help levels