| View previous topic :: View next topic |
| Author |
Message |
Getodacul Voice

Joined: 07 Jun 2007 Posts: 20
|
Posted: Mon Dec 10, 2007 8:40 am Post subject: Unix time |
|
|
| Mon Dec 10 14:24:31 2007 = 1197289471 in unix time . How i must calculate to find a random date? (ex. 30/08/2008 ) |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
|
| Back to top |
|
 |
Getodacul Voice

Joined: 07 Jun 2007 Posts: 20
|
Posted: Mon Dec 10, 2007 9:55 am Post subject: |
|
|
This date Mon Dec 10 14:24:31 2007 it's converted to 1197289471 by my eggdrop. And it's not a random number. I think that's unix time.
I will put the script here:
| Quote: |
####################################################
# What is the minimum access someone needs check ontime?
set ontime(acc) "-|-"
####################################################
bind pub $ontime(acc) "!ontime" ontime:nick
proc ontime:nick { nickname hostname handle channel arguments } {
global ontime
set nickname [lindex [split $arguments] 0]
if {$nickname == ""} {
putquick "PRIVMSG $channel :I need a nick to check it."
return 0
}
if {[string length $nickname] >= "16"} {
putquick "PRIVMSG $channel :Nickname too long."; return
}
putquick "whois $nickname $nickname"
set ::ontimechannel $channel
set ::ontimenickname $nickname
bind RAW - 401 ontime:nosuch
bind RAW - 317 ontime:idle
}
proc ontime:putmsg { channel arguments } {
putquick "PRIVMSG $channel :$arguments"
}
proc ontime:nosuch { from keyword arguments } {
set channel $::ontimechannel
set nickname $::ontimenickname
ontime:putmsg $channel "No such nickname \"$nickname\""
unbind RAW - 401 ontime:nosuch
}
proc ontime:idle { from keyword arguments } {
set channel $::ontimechannel
set nickname $::ontimenickname
set idletime [lindex [split $arguments] 2]
set signon [lindex [split $arguments] 3]
ontime:putmsg $channel "$nickname has been idle for [duration $idletime], signed on [ctime $signon]"
if {$signon >= "1196691738"} {
putserv "PRIVMSG $channel :$nickname have NOT big uptime and deserve flowers."
} else {
putserv "MODE $channel +v $nickname"
putserv "PRIVMSG $channel :$nickname have big uptime and deserve voice. $signon"
}
unbind RAW - 317 ontime:idle
}
putlog "Public ontime script Loaded"
|
This code it's inspired by a part of whois.tcl by MeTroiD
I need to control somehow $signon variable.
1196691738 from the script = Mon Dec 3 16:22:18 2007 |
|
| Back to top |
|
 |
Getodacul Voice

Joined: 07 Jun 2007 Posts: 20
|
Posted: Sat Dec 22, 2007 3:04 pm Post subject: |
|
|
| If i will know how to control that variable i will try to make a top N uptime script (based on signon time). |
|
| Back to top |
|
 |
|