this uses the "whois" and "nickserv info" command rather than storing random parts quite join etc etc etc
Command:
!seen [nick]
thanks to jethro_ for some tips to shorten the code.
;====================================
; ===================================
;
; !seen (nick)
; Made By PuNkTuReD
;
; ===================================
;====================================
on *:text:!seen *:#: {
if ($($+(%,seenwait),2)) { return }
else { set -u5 %seenwait 5 | seen $2 }
}
alias seen {
if ($1 ison $chan) {
if ($1 == $nick) { msg $chan You dont know where you are $+($nick,?) }
elseif ($1 == $me) { msg $chan You can't see me $+($nick,?) }
else { msg $chan $1 is on $+($chan,.) }
}
else { set -u5 %seen $chan | whois $1 }
}
raw *:*: {
if (%seen) {
if ($istok(307 310 311 312 313 314 317 318 320 335 371 378 379,$numeric,32)) { halt }
elseif ($numeric == 319) { msg %seen $2 is on $3- }
elseif ($numeric == 402) { nickserv info $2 | halt }
}
}
on ^*:notice:*:*: {
if ($nick == NickServ) && (%seen) {
if ($count($1-,last seen time:,last quit message:)) { msg %seen $1- }
if (isn't registered isin $1-) { msg %seen I can not retrieve any information on $+($2,.) }
halt
}
}
You can use $count() in place of || and isin like so:
if (Last seen time: isin $1-) || (Last quit message: isin $1-) { msg %seen $1- }
compared to:
if ($count($1-,last seen time:,last quit message:)) { msg %seen $1- }
These two conditions are pretty much the same thing, but one is shorter than the other as shown.