The problem is that you're deleting an item and increasing %x.

Try this instead
Code:
alias del_users {
 var %x = 1
 while (%x <= $hfind(nicks,/^?!((.+?)\.(.+?)))/,0,r)) {
   hdel nicks $hfind(nicks,/^?!((.+?)\.(.+?)))/,%x,r)
   dec %x
 }
 inc %x
}