Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Simple Seen v1.6 - by entropy 2017
- ; Usage: !seen <nick>
- on *:start:{ .timerseen -o 0 300 saveall }
- on *:exit:{ saveall }
- on *:disconnect:{ if ($hget($+(seen.,$network))) { hsave -o $+(seen.,$network) $qt($+($scriptdir,seen.,$network,.dat)) | hfree $+(seen.,$network) } }
- on *:connect:{
- if (!$hget($+(seen.,$network))) { hmake $+(seen.,$network) 100 }
- if ($exists($qt($+($scriptdir,seen.,$network,.dat)))) { hload $+(seen.,$network) $qt($+($scriptdir,seen.,$network,.dat)) }
- }
- alias -l saveall { var %a = 1, %b | while ($scon(%a)) { %b = $v1 | scid %b | if ($hget($+(seen.,$network))) { hsave -o $+(seen.,$network) $qt($+($scriptdir,seen.,$network,.dat)) } | inc %a } }
- alias -l clearall { var %a = 1, %b | while ($scon(%a)) { %b = $v1 | scid %b | if ($hget($+(seen.,$network))) { hfree $+(seen.,$network) | hmake $+(seen.,$network) 100 } | inc %a } }
- #seen on
- on *:text:*:#:{
- hadd -m $+(seen.,$network) $nick $fulladdress $ctime Ha enviat un missatge al canal # amb text: $qt($1-)
- if (?seen iswm $1 && $left($1,1) isin @!. && $2) { .timerdoseen -o 1 2 seenx # $2- }
- }
- on *:input:#:{
- hadd -m $+(seen.,$network) $me $address($me,5) $ctime He escrit $qt($1-) a #
- if (?seen iswm $1 && $left($1,1) isin @!. && $2) { .timerdoseen -o 1 2 seenx # $2- }
- }
- on *:action:*:#:{ hadd -m $+(seen.,$network) $nick $fulladdress $ctime Actioning # amb el text: $qt($1-) }
- on *:join:#:{ hadd -m $+(seen.,$network) $nick $fulladdress $ctime Ha entrat a # }
- on *:part:#:{ hadd -m $+(seen.,$network) $nick $fulladdress $ctime Ha sortit de # amb el text: $qt($1-) }
- on *:rawmode:#:{ hadd -m $+(seen.,$network) $nick $fulladdress $ctime Ha canviat els modes de # a: $qt($1-) }
- on *:kick:#:{ hadd -m $+(seen.,$network) $nick $fulladdress $ctime Kicking $knick out of # with text: $qt($1-) }
- on *:quit:{ hadd -m $+(seen.,$network) $nick $fulladdress $ctime Ha desconectat de $network amb el text: $qt($1-) }
- on *:topic:#:{ hadd -m $+(seen.,$network) $nick $fulladdress $ctime Ha canviat el topic de # a: $qt($1-) }
- on *:nick:{ hadd -m $+(seen.,$network) $nick $fulladdress $ctime S'ha canviat el nick a: $newnick }
- alias seenx {
- var %a = $2
- var %b = $hget($+(seen.,$network),$2)
- var %q = $hfind($+(seen.,$network),$2,1).item
- var %time = $asctime($gettok($hget($+(seen.,$network),%a),2,32))
- var %nt = $gettok($hget($+(seen.,$network),%a),2,32)
- var %dur = $calc($ctime - %nt)
- var %dur = Fa $replace($duration(%dur),wks,setmanes,wk,setmanes,days,dies,day,dia,hrs,hores,hr,hora,mins,minuts,min,minut,secs,segons,sec,segonAEA)
- var %rsn = $gettok($hget($+(seen.,$network),%a),3-,32)
- var %no = $gettok(%a,1,33)
- var %mo = $gettok($gettok(%b,1,32),2,33)
- if (%b) { msg $1 [Seen] $chr(9679) L'ultima vegada que s'ha vist a l'usuari/a $qt(%q) ha sigut $iif(%mo,$+($chr(40),%mo,$chr(41))) %time $+($chr(40),%dur,$chr(41)) - %rsn }
- else { msg $1 [Seen] $chr(9679) No s'ha trobat informació per $qt($2). }
- }
- #seen end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement