You could change:
timer 1 0 raw -q MODE $chan +b $address($nick,2)
timer 1 1 raw -q KICK $chan $nick :You have been banned for two minutes due to a repeated offense of an unauthorized advertisement.
into
ban -k $nick 2 You have been banned for two minutes due to a repeated offense of an unauthorized advertisement.
, as the "-k" switch signifies the "kick" and the "2" signifies the mask #.
I don't think timers are necessary, nor the raws.
if ($nick !isreg #) || ($nick == $me) { halt }
could be removed and substituted with (on the next line)
if ($nick isreg #) {
, and start there, as scripts do not activate by "you".
Also, I wouldn't advise you to use
.timer 1 0 <action>
or use
on *:TEXT:*www.*:...{
, and
on *:TEXT:*#*:...
because someone could say something like this and could be banned like this.
Who's #1 on the stats?
BanBot1337 sets mode: +b !*@cows.go.mooooooooo.org You have been banned for two minutes due to a repeated offense of an unauthorized advertisement., or something like that. :P
I've also realized something: You used
inc %ad. [ $+ [ $nick ] ]
If you're going to ban by $address($nick,2), then why not inc the same way?
People can easily by-pass this ban by changing nicks.
Not sure how you can fix the "www" and "#" things, so you should ask a person who is familiar with regex (regular expressions).