Coders-IRC


IRC for Coders

Simple Seen Snippet


image
ON *:TEXT:*:#: {
  hadd seen $nick text $chan $ctime $1-
  if ($1 = !seen) {
    if ($count($2, ?, *)) {

      var %max = 5 | ; maximum number of results

      var %i = 1, %n = $hfind(seen, $2, 0, w)
      msg $chan $nick $+ : %n result $+ $iif(%n != 1, s) for $2. $iif(%n > %max, Showing first %max) 
      while (%i <= %max) && ($hfind(seen, $2, %i, w)) {
        msg $chan $nick $+ : $seenparse($v1)
        inc %i
      }
    }
    elseif ($2 ison $chan) { msg $chan $2 is right here. }
    else { msg $chan $nick $+ : $seenparse($2) }
  }
}

Comments 0