And I'm sorry too, I had played too fast and loose with copy paste, and I accidentally used the same filename for the excluded as used for the allowed, so it was working but was always excluding everyone. So this should work. But also remember about using the 4th parameter of $nick() to exclude the ops. It will avoid the need to add their nicks to the exclusion list, and it also makes the loop smaller because there are fewer nicks to check

Code
on *:OP:#:{
  if ($opnick != $me) return
  var %i 1
  while ($nick($chan,%i,a) != $null) {
    noop $BaneaUsuarios( $v1 , $chan )
    inc %i
  }
}

alias BaneaUsuarios {
  var %cuentaNicks = 1 , %badwords_total $lines(patrones.txt) , %except_total $lines(patrones-exceptuados.txt)
  while (%cuentaNicks <= %badwords_total) {
    var %linetext $read(patrones.txt,nt,%cuentaNicks)
    if (%linetext isin $1) || (%linetext iswm $1) {
      var %cuentaExcepciones = 1

      while (%cuentaExcepciones <= %except_total) {
        var %except_linetext $read(patrones-exceptuados.txt,nt,%cuentaNicks)
        if (%except_linetext isin $1) || (%except_linetext iswm $1) {
          ;halt
          return
        }
        inc %cuentaExcepciones
      }
      ban $2 $1 $+ !*@* | kick $2 $1 1Su nick no es el mas adecuado para la tematica del canal 4 $chan 1Por Favor, cambielo. 4Gracias.
      return
      ;halt
    }
    inc %cuentaNicks
  }

}