it's difficult to say without knowing the contents of the hash table, however you can eliminate the loop by using $hfind()'s W option:

Code:
alias cexcctcp return $iif($hfind(exclude.ctcp, $nick, 1, W), $true, $false)


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde