a BASIC example would be:
on @*:text:swear-word:#your-channel: {
inc %swear.counter. $+ $nick 1
if (%swear.counter. $+ $nick == 3) { ban -u60 $nick 2 }
}
I colored the -u60 because if you change that time, it changes the length of timed ban (all values in seconds so 120 would be 120 seconds which is 2 minutes). Now, there's also some down sides to this type of script in that the variables NEVER unset (meaning they're always active) AND it will ban them each time after the 3rd time for 1 minute (or whatever you change it to) as opposed to resetting when you disconnect or leave IRC altho that can be done easily enough by doing:
on *:disconnect:/unset %swear.counter.*
The %swear.counter.* includes ALL variables with the name begining with %swear.counter. so that %swear.counter.1 %swear.counter.2 %swear.counter.3 %swear.counter.boib %swear.counter.mom %swear.counter.dad & %swear.counter.byteme would all be unset
FYI, somebody else will most certainly give you better coding, but that WOULD work