on ^*:TEXT:*:#:{
if ($1 == !seen) || ($1 == .seen) || ($1 == @seen) && (!%seen) { check_seenanother_flood $nick
if ($2) && ($2 != |) && ($left($2,1) != $) {
if ($2 == $nick) { msg $chan [Seen] Are you looking for yourself, $nick $+ ? }
if ($2 ison $chan) { msg $chan [Seen] $2 is still on the channel $chan $+ . }
elseif ($2 == $me) { msg $chan $nick $+ : Sorry, you cann't seen me. }
else {
if (*!*@* iswm $2) {
if ($read(seen.txt,w,* * $+ $2 $+ * :*)) {
var %seennickvar = $lines(seen.txt), %seennicks, %seennick
while ($readn <= %seennickvar) {
if ($read(seen.txt,w,* * $+ $2 $+ * :*,$calc($readn +1))) {
var %seennickvar2 = $ifmatch
if ($count(%seennicks,$chr(32)) < 20) && (*. $+ $gettok(%seennickvar2,1,32) $+ ,* !iswm %seennicks) { set %seennicks %seennicks , $+ $gettok(%seennickvar2,1,32) $+ , | inc %seennick }
}
else { set %seennickvar 0 }
}
if (%seennick == 1) { seen $chan $read(seen.txt,w,* * $+ $2 $+ * :*) }
elseif (%seennick < 20) { msg $chan $nick $+ : Found %seennick matching nicks: $left($remove(%seennicks,.),-1) $+ . }
else { msg $chan [Seen] To many results $nick $+ , try spesific it a bit more. }
}
else { msg $chan $nick $+ : No matches were found matching your search. }
}
else {
if ($read(seen.txt,w,* $+ $2 $+ * *!*@* :*)) {
if ($read(seen.txt,w,$2 *)) { seen $chan $ifmatch }
else {
var %seennickvar = $lines(seen.txt), %seennicks, %seennick
while ($readn <= %seennickvar) {
if ($read(seen.txt,w,* $+ $2 $+ * *!*@* :*,$calc($readn +1))) {
var %seennickvar2 = $ifmatch
if ($count(%seennicks,$chr(32)) < 20) && (*. $+ $gettok(%seennickvar2,1,32) $+ ,* !iswm %seennicks) { set %seennicks %seennicks . $+ $gettok(%seennickvar2,1,32) $+ , | inc %seennick }
}
else { set %seennickvar 0 }
}
if (%seennick == 1) { seen $chan $read(seen.txt,w,* $+ $2 $+ * *!*@* :*) }
elseif (%seennick < 20) { msg $chan [Seen] Found %seennick matching nicks: $left($remove(%seennicks,.),-1) $+ . }
else { msg $chan $nick $+ : To many results $nick $+ , try spesific it a bit more. }
}
}
else { msg $chan $nick $+ : Sorry, i don't remember seeing $2 lately. }
}
}
}
else { msg $chan $nick $+ : Error command, Syntax: ./!/@seen <nick/mask> }
.ignore -u2 $nick
set -u3 %seen 1
}
}
alias -l check_seenanother_flood {
var %nickseenanother $1, %hostseenanother $ial($1).host, %delay_seenanother_time 10
if ($hget(stop-seenanother-flood,%hostseenanother)) {
if (!$hget(stop-seenanother-flood-msg, %hostseenanother)) {
msg $chan -ATTENTION- %nickseenanother $+ , You have recently used this command, further attempts will be ignored. Please wait a while to reused...
.hadd -mz stop-seenanother-flood-msg %hostseenanother %delay_seenanother_time
}
halt
}
.hadd -mz stop-seenanother-flood %hostseenanother %delay_seenanother_time
}
alias seen {
if ($gettok($2-,3,32) == :SAY) { msg $1 [Seen] As far as I know, $gettok($2-,1,32) ( $+ $right($gettok($2-,2,32),-3) $+ ) was last seen said on $gettok($2-,6,32) $duration($calc($ctime - $ctime($gettok($2-,4-5,32)))) ( $+ $gettok($2-,4-5,32) $+ ) ago with the text message: " $+ $gettok($2-,7-,32) $+ ". }
if ($gettok($2-,3,32) == :JOIN) { msg $1 [Seen] $gettok($2-,1,32) ( $+ $right($gettok($2-,2,32),-3) $+ ) was last seen joined $gettok($2-,6,32) $duration($calc($ctime - $ctime($gettok($2-,4-5,32)))) ( $+ $gettok($2-,4-5,32) $+ ) ago. $gettok($2-,1,32) is still on $gettok($2-,6,32) $+ . }
if ($gettok($2-,3,32) == :PART) { msg $1 [Seen] $gettok($2-,1,32) ( $+ $right($gettok($2-,2,32),-3) $+ ) was last seen parted $gettok($2-,6,32) for $duration($calc($ctime - $ctime($gettok($2-,4-5,32)))) ( $+ $gettok($2-,4-5,32) $+ ) $iif($gettok($2-,7,32),ago with the part message " $+ $gettok($2-,7-,32) $+ ".,ago. And after $gettok($2-,1,32) stayed $duration($calc($gettok($2-,5,32))) on $gettok($2-,6,32)) $+ . }
if ($gettok($2-,3,32) == :KICK) { msg $1 [Seen] $gettok($2-,1,32) ( $+ $right($gettok($2-,2,32),-3) $+ ) was last seen when he got kicked by $gettok($2-,7,32) from $gettok($2-,6,32) in $duration($calc($ctime - $ctime($gettok($2-,4-5,32)))) ( $+ $gettok($2-,4-5,32) $+ ) ago with the kick message " $+ $gettok($2-,8-,32) $+ ". And after $gettok($2-,1,32) stayed $duration($calc($gettok($2-,5,32))) on $gettok($2-,6,32)) $+ . }
if ($gettok($2-,3,32) == :KICKING) { msg $1 [Seen] $gettok($2-,1,32) ( $+ $right($gettok($2-,2,32),-3) $+ ) was last seen kicked $gettok($2-,7,32) from $gettok($2-,6,32) in $duration($calc($ctime - $ctime($gettok($2-,4-5,32)))) ( $+ $gettok($2-,4-5,32) $+ ) ago with the kick message " $+ $gettok($2-,8-,32) $+ ". }
if ($gettok($2-,3,32) == :TOPIC) { msg $1 [Seen] $gettok($2-,1,32) ( $+ $right($gettok($2-,2,32),-3) $+ ) was last seen changing topic in $gettok($2-,6,32) from $duration($calc($ctime - $ctime($gettok($2-,4-5,32)))) ( $+ $gettok($2-,4-5,32) $+ ) ago. }
if ($gettok($2-,3,32) == :NICK) { msg $1 [Seen] $gettok($2-,1,32) ( $+ $right($gettok($2-,2,32),-3) $+ ) was last seen changing nick to $+(,$gettok($2-,6,32),) on ( $+ $gettok($2-,4-5,32) $+ ). As far as I know $+(,$gettok($2-,1,32),) has changed nick for $duration($calc($ctime - $ctime($gettok($2-,4-5,32)))) ago. }
if ($gettok($2-,3,32) == :QUIT) { msg $1 [Seen] $gettok($2-,1,32) ( $+ $right($gettok($2-,2,32),-3) $+ ) has left IRC $duration($calc($ctime - $ctime($gettok($2-,4-5,32)))) ( $+ $gettok($2-,4-5,32) $+ ) $iif($gettok($2-,6,32),ago with the quit message " $+ $gettok($2-,6-,32) $+ ".,ago.) As far as I know, $gettok($2-,1,32) has online for $duration($calc($gettok($2-,5,32))) after left IRC. }
}
on *:text:*:#: {
if ($nick != $me) && ($address($nick,1)) {
write -dw"* $+ $address($nick,1) $+ *" seen.txt
write -dw" $+ $nick *" seen.txt
write seen.txt $nick $address($nick,1) :SAY $date $time $chan $remove($strip($1-,bruc),$,|,$chr(35))
}
}
on *:action:*:#: {
if ($nick != $me) && ($address($nick,1)) {
write -dw"* $+ $address($nick,1) $+ *" seen.txt
write -dw" $+ $nick *" seen.txt
write seen.txt $nick $address($nick,1) :SAY $date $time $chan $remove($strip($1-,bruc),$,|,$chr(35))
}
}
on *:join:#: {
if ($nick != $me) && ($address($nick,1)) {
write -dw"* $+ $address($nick,1) $+ *" seen.txt
write -dw" $+ $nick *" seen.txt
write seen.txt $nick $address($nick,1) :JOIN $date $time $chan
}
}
on *:part:#:{
if ($nick != $me) && ($address($nick,1)) {
write -dw"* $+ $address($nick,1) $+ *" seen.txt
write -dw" $+ $nick *" seen.txt
write seen.txt $nick $address($nick,1) :PART $date $time $chan $remove($strip($1-,bruc),$,|,$chr(35))
}
}
on *:kick:#:{
if ($nick != $me) && ($address($nick,1)) {
write -dw"* $+ $address($nick,1) $+ *" seen.txt
write -dw" $+ $nick *" seen.txt
write seen.txt $nick $address($nick,1) :KICKING $date $time $chan $knick $remove($strip($1-,bruc),$,|,$chr(35))
}
if ($knick != $me) && ($address($knick,1)) {
write -dw"* $+ $address($knick,1) $+ *" seen.txt
write -dw" $+ $knick *" seen.txt
write seen.txt $knick $address($knick,1) :KICK $date $time $chan $nick $remove($strip($1-,bruc),$,|,$chr(35))
}
}
on *:topic:#: {
if ($nick != $me) && ($address($nick,1)) {
write -dw"* $+ $address($nick,1) $+ *" seen.txt
write -dw" $+ $nick *" seen.txt
write seen.txt $nick $address($nick,1) :TOPIC $date $time $chan
}
}
on *:nick: {
if ($nick != $me) && ($address($newnick,1)) {
write -dw"* $+ $address($newnick,1) $+ *" seen.txt
write -dw" $+ $newnick *" seen.txt
write seen.txt $nick $address($newnick,1) :NICK $date $time $newnick
}
}
on *:quit: {
if ($nick != $me) && ($address($nick,1)) {
write -dw"* $+ $address($nick,1) $+ *" seen.txt
write -dw" $+ $nick *" seen.txt
write seen.txt $nick $address($nick,1) :QUIT $date $time $remove($strip($1-,bruc),$,|,$chr(35))
}
}