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:
####################################################
# 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: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