oops.. thought there was something missing. Wildcard searches are not included in my code, as you didn't specify that you wanted/needed that option, and it will make the code more difficult.

I'll think about the alterations required to allow for wildcard searches, but in the mean time, try this version
Code:
on *:text:!searchip <nick>:*:{
  if $hget(userips,$1) {    .msg $nick $1 $+ 's IPs are $v1  }
  elseif !$hfind(userips,$+(*,$1,*),0,w).data {    .msg $nick No match found for $1  }
  else {
    var %a = 1, %b = $hfind(userips,$+(*,$1,*),0,w).data
    .msg $nick Matches for $1 are:
    while %a <= %b {
      .timer 1 %a msg $nick $hfind(userips,$+(*,$1,*),%a,w).data
      inc %a
    }
  }
}