This is how I tried to edit, but still same problem...List of allowed words is not considered and user is banned altought the word is in the list:

Code
on *:text:*:#MYCHANNEL:{
  if ($nick !isop #) && ($nick !ishop #) && ($nick !isvoice #) { 
    $bad($1-) 
  } 
} 

alias bad { 
  var %i 1
  while (%i <= $lines(badwords\eccezioni.txt)) {    /* File with list of allowed words*/
         if ($read(badwords\eccezioni.txt, %i) iswm $1- ) { halt }   /* Check if used words are allowed in eccezioni.txt file */
    inc %i
  }
  var %o 1 
  while (%o <= $lines(badwords\badwords.txt)) {
    if ($read(badwords\badwords.txt, %o) iswm $1- ) { 
      ban -u3600 #MYCHANNEL $address($nick,2) | write $mircdir $+ banlog.txt *Badwords* $date $time $nick ---> $address  /* BAN after been WARNED and write log in a eccezioni.txt
      kick #eMule-Italian $nick /* KICK after been WARNED */
      unset %bad [ $+ [ $nick ] ] 
    } 
    elseif ($read(badwords\badwords.txt, %o) iswm  $1- ) { 
      kick #eMule-Italian $nick TO WRITE $read(badwords\badwords.txt, %o)  /*WARNING WITH NOT ALLOWED WORD HERE */
      set %bad [ $+ [ $nick ] ] $nick 
      .timer 1 300 unset %bad [ $+ [ $nick ] ] 
    } 
    inc %o 
  } 
} 

List of allowed words is in a eccezioni.txt file
Any help please?
Thanks