ABOUT:
A seen script I made. It stores all the data in a hash table, constantly updating the nick's current seen status. Simple code, simple to use. Editing is fine, as long as you give me credit for the work that is mine
Now includes a dialog.
USAGE:
You can use this two different ways:
2) !seen (nick) - for other users
3) /call_seen -> type in nick to search for and click 'search'
; ##################################
; # Seen v1.3 - RubixCube #
; ##################################
; ##### MAIN #####
on *:load: if (!$hget(seen)) hmake seen 100
on *:TEXT:!seen*:#:{
if (!$hget(seen)) hmake seen 100
if ($2) {
if ($2 ison $chan) msg $chan $2 is already in the channel.
else {
if ($hget(seen,$2)) msg $chan $2 was last seen $hget(seen,$2)
else { msg $chan $2 isn't in the seen database. }
}
}
}
on *:TEXT:*:#:{
if ($hget(seen,$nick)) hdel seen $nick
.hadd -m seen $nick $seen.msg(text)
}
on *:KICK:*:#:{
if ($nick != $me) {
if ($hget(seen,$nick)) hdel seen $nick
.hadd -m seen $nick $seen.msg(kick)
}
}
on *:PART:#:{
if ($nick != $me) {
if ($hget(seen,$nick)) hdel seen $nick
.hadd -m seen $nick $seen.msg(part)
}
}
on *:JOIN:#:{
if ($nick != $me) {
if ($hget(seen,$nick)) hdel seen $nick
.hadd -m seen $nick $seen.msg(join)
}
}
on *:QUIT:{
if ($nick != $me) {
if ($hget(seen,$nick)) hdel seen $nick
.hadd -m seen $nick $seen.msg(quit)
}
}
on *:ACTION:#:{
if ($nick != $me) {
if ($hget(seen,$nick)) hdel seen $nick
.hadd -m seen $nick $seen.msg(act)
}
}
on *:NICK:{
if ($nick != $me) {
if ($hget(seen,$nick)) hdel seen $nick
.hadd -m seen $newnick $seen.msg(nick)
}
}
on *:START:{
if (!$hget(seen)) hmake seen 100
hload seen seen.hsh
}
on *:EXIT:{
if ($hget(seen)) {
hsave -o seen seen.hsh
}
}
alias seen.msg {
if ($1 = text) return Saying $1- in $chan at $time(h:nntt) on $+($date,.)
if ($1 = part) return Leaving $chan at $time(h:nntt) on $+($date,.)
if ($1 = join) return Joining $chan at $time(h:nntt) on $+($date,.)
if ($1 = act) return Describing to $+($chan,:) $1- at $time(h:nntt) on $+($date,.)
if ($1 = quit) return Quitting $chan with message: $1- at $time(h:nntt) on $+($date,.)
if ($1 = nick) return $newnick has changed from original nick $+($chr(40),$nick,$chr(41)) at $time(h:nntt) on $+($date,.)
if ($1 = kick) return Being kicked by $nick at $time(h:nntt) on $+($date,.)
}
; #### DIALOG ####
dialog seen_dial. {
title "Seen system: "
size -1 -1 275 96
option pixels notheme
edit "", 2, 5 66 263 27, read autohs
edit "", 4, 11 10 161 20
button "Search", 5, 182 8 65 25
edit "", 1, 11 37 245 20, read
}
on *:dialog:seen_dial.:sclick:5:{
if ($did($dname,4).text) {
did -ra $dname 1 $hget(seen,$v1).item
did -ra $dname 2 $hget(seen,$did($dname,1).text).data
}
}
alias call_seen dialog $iif($dialog(seen_dial.),-v,-md) seen_dial. seen_dial.
alias call_seen dialog $iif($dialog(seen_dial.),-v,-md) seen_dial. seen_dial.
There are two possible reasons why it isn\'t working:
1) You haven\'t seen the nicks already. Also, it doesn\'t work for you it only works for other users. This script doesn\'t just work at first. You have to wait till the user joins a channel or quits or parts etc.
2) There are some servers that support !seen in there botserv. Your server\'s !seen might be interfering with mine.
Er, it doesn\'t really work for me
-(10:49)- !Seen Riht
-(10:49)- -AnimeBot- Riht was last seen 1 day, 18 hours ago (28/Sep/07 23:45 GMT).
-(10:49)- :|
-(10:50)- !Seen Riht
-(10:50)- -AnimeBot- Riht was last seen 1 day, 18 hours ago (28/Sep/07 23:45 GMT).
-(10:50)- Riht was last seen
-(10:50)- .
-(10:50)- !Seen Weavile
-(10:50)- -AnimeBot- Weavile is online now, using the nick Aeroku-Namiashi.
-(10:50)- Weavile was last seen
-(10:50)- .
-(10:51)- ...
-(10:51)- :|