Generally 'spamming' a channel refers to advertising websites or other channels.
The script you gave is more like a flood script. As I modified it
It will kick/warn anyone for sending *any* text to channel at a rate higher than 3 lines in 3 seconds,
and ban/kick anyone who manages to send 4 lines of any text to channel in 3 seconds.

If what you want is to warn at first instance of spam, as defined above,
and ban/kick if they re-offend within 2 minutes:

Code:
on *:TEXT:*:#:{
  if ( (*http*//* iswm $1-) || (*www.* iswm $1-) || (*join*#* iswm $1-) ) {
    if ( $($+(%,spam.,$nick),2) ) {
      ban -k $nick 1 Spamming. You were warned.
    }
    else set -u120 $+(%,spam.,$nick) 1
    msg $chan $nick $+ , Do Not Spam! You have been warned.
  }
}


To warn on 1st offense, kick on 2nd offense, ban on 3rd, with no time limit between offenses:

Code:
on *:TEXT:*:#:{
  if ( (*http*//* iswm $1-) || (*www.* iswm $1-) || (*join*#* iswm $1-) ) {
    if ( $($+(%,spam.,$nick),2) == 2 ) {
      ban -k $nick 1 Spamming. You were warned.
    }
    elseif ( $($+(%,spam.,$nick),2) == 1 ) {
      kick $nick 1 Spamming. You were warned.
      inc $+(%,spam.,$nick)
    }
    else inc $+(%,spam.,$nick)
    msg $chan $nick $+ , Do Not Spam! You have been warned.
  }
}



LonDart