on :text:!seen:#: {
if ($1 == !seen) && ($2 != $null) {
if ($3 != $null) { halt }
if ($2 == $nick) {
msg $chan Look a little harder and you might find yourself $nick
halt
}
if ($2 == $me) {
msg $chan Find me yet $nick $+ ?
halt
}
if ($2 ison $chan) {
msg $chan $2 is currently on the channel.
halt
}
if ($hfind(Seendata,$2) == $null) {
msg $chan $2 was not found in the database.
halt
}
else {
set %seenres $hget(Seendata,$hfind(Seendata,$2))
if ($left(%seenres,1) == J) {
msg $chan $2 was last seen $duration($calc($ctime - $gettok(%seenres,4,32))) ago.
halt
}
if ($left(%seenres,1) == P) {
msg $chan $2 was last seen $duration($calc($ctime - $gettok(%seenres,4,32))) ago.
halt
}
if ($left(%seenres,1) == Q) {
msg $chan $2 was last seen $duration($calc($ctime - $gettok(%seenres,4,32))) ago.
halt
}
if ($left(%seenres,1) == K) {
msg $chan $2 was last seen $duration($calc($ctime - $gettok(%seenres,4,32))) ago.
halt
}
if ($left(%seenres,1) == N) {
msg $chan $2 was last seen changing nickname to $gettok(%seenres,5,32) $duration($calc($ctime - $gettok(%seenres,4,32))) ago.
set %seenres2 $hget(Seendata,$hfind(Seendata,$gettok(%seenres,5,32)))
if ($gettok(%seenres,5,32)) !ison $chan) { msg $chan $gettok(%seenres,5,32)) was last seen $duration($calc($ctime - $gettok(%seenres2,4,32))) ago. }
if ($gettok(%seenres,5,32)) ison $chan) { msg $chan $gettok(%seenres,5,32)) is currently on the channel. Looks like your in luck $nick $+ !! }
halt
}
}
}
if ($1 == !seen) && ($2 == $null) {
msg $chan are you looking for someone?
return
}
else {
return
}
}