Sephiroth
http://sephiroth.scifi-action.de/board/

Peak Script
http://sephiroth.scifi-action.de/board/viewtopic.php?f=4&t=27
Seite 1 von 1

Autor:  Sephiroth [ 18. März 2008 00:19 ]
Betreff des Beitrags:  Peak Script

;
; /peak # - msgs the peak to the given channel (from this channel)
; $peak(#) - returns the peak from the given channel
;
raw 366:*:{ if (($readini(peak.ini,peak,peak $+ $2) < $nick($2,0)) && ($me ison $2)) { peakthis $2 $nick($2,0) $ctime $me } }
on !1:join:#:{ peakthis # $nick(#,0) $ctime $nick }
alias -l peakthis { if ($readini(peak.ini,peak,peak $+ $1) < $2) { w peak $+ $1 $2 | w date $+ $1 $3 | w nick $+ $1 $4 } }
alias -l w !.writeini peak.ini peak $1- }
alias peak {
  if ($isid) { var %x = return }
  else { var %x = msg $$1 }
  %x Peak: $readini(peak.ini,peak,peak $+ $1) reached $unix.dur($calc($ctime - $readini(peak.ini,peak,date $+ $1))) ago ( $+ $asctime($readini(peak.ini,peak,date $+ $1),ddd · dd/mmm/yyyy · hh:nn:sstt) $+ ) by $readini(peak.ini,peak,nick $+ $1)
}
on *:load:{ write -c peak.ini }
alias -l unix.dur { %t = $1 | var %z = $left($asctime(z),1) $+ $calc($asctime(zz) * 36) | return $unix.s(86400,day) $+ , $iif($version < 6.1,$asctime($calc(%t $replace(%z,+,f,-,+,f,-)),HH:nn:ss),$duration(%t,3)) | unset %t }
alias -l unix.s { %x = $int($calc(%t /$1)) | %t = %t % $1 | return %x $+ $2 $+ $iif(%x != 1,s) }

Seite 1 von 1 Alle Zeiten sind UTC + 1 Stunde
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/