I missed a comma in my regex string. I edited it. Also, you can just use
Code:
unset %ad.*
If you unset all of it, then it unsets other "warned" nicks/addresses as well.
So what I would've done is something like this, taking Jethro_'s regex on text:
on $*:text:/(www\56|\57\57\56|\72\57\57|\43,[a-zA-Z]|.com)/iS:#: {
if ($nick isreg #) {
inc %ad. [ $+ [ $wildsite ] ]
if (%ad. [ $+ [ $wildsite ] ] == 1) { .notice $nick This is your first warning to notify you that you are advertising without authorization. }
if (%ad. [ $+ [ $wildsite ] ] == 2) { .kick $chan $nick You have been kicked due to an unauthorized advertisement. }
if (%ad. [ $+ [ $wildsite ] ] == 3) { ban -ku120 $nick 2 You have been banned for two minutes due to a repeated offense of an unauthorized advertisement. }
if (%ad. [ $+ [ $wildsite ] ] == 4) { ban -ku1800 $nick 2 You have been banned for thirty minutes due to a repeated offense of an unauthorized advertisement. | unset %ad. [ $+ [ $wildsite ] ] }
}
}
I've also forgotten to mention that there's a -u switch, which means unset in # of seconds.
So
ban -u120k
would ban, kick, and unban in 120 seconds (2 minutes).