Here's something I've done quickly at work, obviously you can change it to suit your needs...

This will store a max of 6 nicks at one time it will alternate between displaying 5 and 6 nicks that are matched. This will prevent the line too long error.

Obviously this is very basic but can be expanded on...

Code:
on *:LOAD:{
 echo -a Loading ip/nick store info...
 if (!$hget(IPNickStore)) { hmake IPNickStore 100 }
 ;we check that hashtable isn't created as we may have added stuff before closing down, script has just reloaded.
 if ($exists(ipnickstore.dat)) && (!$hget(IPNickStore)) { hload IPNickStore ipnickstore.dat }
}
on *:JOIN:#:{
 if ($nick != $me) {
  if ($hget(IPNickStore,$gettok($fulladdress,2-,33)) > 1) {
   if (!$findtok($hget(IPNickStore,$gettok($fulladdress,2-,33)),$nick,44)) {
    hadd IPNickStore $gettok($fulladdress,2-,33) $gettok($+($hget(IPNickStore,$gettok($fulladdress,2-,33)),$chr(44),$nick,$chr(44)),$iif($numtok($hget(IPNickStore,$gettok($fulladdress,2-,33)),44) == 5,2-6,1-),44)
   }
   msg # Matched: $gettok($fulladdress,2-,33) nicks: $hget(IPNickStore,$gettok($fulladdress,2-,33)) $iif($hget(IPNickStore,$+($gettok($fulladdress,2-,33),.msg)),reason: $v1)
  }
 }
}
on *:TEXT:*:#:{
 tokenize 32 $strip($1-)
 if ($1 == !addip) {
  if ($ial($2)) {
   if ($3) { hadd IPNickStore $+($gettok($ial($2),2-,33),.msg) $3- }
   if ($hget(IPNickStore,$gettok($ial($2),2-,33))) { msg # user already stored, if you supplied a message this has been changed | return }
   hadd IPNickStore $gettok($ial($2),2-,33) $gettok($+($hget(IPNickStore,$gettok($ial($2),2-,33)),$chr(44),$gettok($ial($2),1,33),$chr(44)),$iif($numtok($hget(IPNickStore,$gettok($ial($2),2-,33)),44) == 5,2-6,1-),44)
   msg # added entry $gettok($ial($2),2-,33)
  }
  ;present this message instead of /who'ing the channel, could cause flooding/disconnect issues...
  else { msg # user not here or need to /who # }
 }
 elseif ($1 == !remip) {
  if ($hfind(IPNickStore,$gettok($ial($2),2-,33),0,w)) { hdel IPNickStore $gettok($ial($2),2-,33) | msg # removed $2 }
  else { msg # user not stored }
 }
}
on *:EXIT:{
 hsave IPNickStore ipnickstore.dat
}

Last edited by Rewtor; 08/02/11 04:55 PM.