Noticias:

Mata al pato \_O< en el canal #Traffic-Games

Menú Principal

Uptime

Iniciado por TerraChat, Sep 26, 2023, 11:30 AM

Tema anterior - Siguiente tema

TerraChat

# Seteo
set time(dcc) "serv"
set time(msg) ".serv"
set time(pub) "!serv"
set time(flag) "-"
set time(col1) "\00314"
set time(col2) "\00313"
###########################################################################
set vrs "0.2"
###########################################################################
# BINDS
bind pub "$time(flag)" "$time(pub)" uptime:pub
bind dcc "$time(flag)" "$time(dcc)" uptime:dcc
bind msg "$time(flag)" "$time(msg)" uptime:msg
###########################################################################
#bind time - "00 * * * *" [eggtime]
#bind time - "10 * * * *" [eggtime]
###########################################################################
# PROCS

proc uptime:pub {nick uhost hand chan arg} {
  putserv "PRIVMSG $chan :[eggtime]"
}

proc uptime:msg {nick uhost hand arg} {
  putserv "PRIVMSG $nick :[eggtime]"
}

proc uptime:dcc {hand idx arg} {
  putdcc $idx "[eggtime]"
}

proc eggtime {} {
  set ::time(uptime) [expr [clock seconds]-$::uptime]
  set ::time(week) [expr $::time(uptime)/604800]
  set ::time(uptime) [expr $::time(uptime)-$::time(week)*604800]
  set ::time(days) [expr $::time(uptime)/86400]
  set ::time(uptime) [expr $::time(uptime)-$::time(days)*86400]
  set ::time(hour) [expr $::time(uptime)/3600]
  set ::time(uptime) [expr $::time(uptime)-$::time(hour)*3600]
  set ::time(mins) [expr $::time(uptime)/60]
  set ::time(uptime) [expr $::time(uptime)-$::time(mins)*60]
  set ::time(secs) $::time(uptime)
  set ::time(return) "$::time(col2)$::botnick $::time(col1)mi uptime es:$::time(col2) $::time(week) $::time(col1)semana\(s\)$::time(col2) $::time(days) $::time(col1)dia\(s\)$::time(col2) $::time(hour) $::time(col1)hora\(s\)$::time(col2) $::time(mins) $::time(col1)minuto\(s\)$::time(col2) $::time(secs) $::time(col1)segundo\(s\)."
  return $::time(return)
}

putlog "=== Uptime @ $vrs ==="