if {[info exists queue($variable)} {
if {[expr [unixtime] - $queue($variable)]<86400} {
set calctime [expr [unixtime] - queue($variable)]
putquick "PRIVMSG $channel :you cant because you need to wait $calctime"
}
}
set queue($variable) [unixtime]
I have got this code in my Tcl script, so each user will need to wait 24 hours before can do the command again.
I would to put a countdown showing how much time (hours,minutes,seconds) they need to wait before can do it again. But at the moment the only thing I can do is put the seconds counting with the $calctime
Any idea how I can do it? Definitly my try of $calctime is a failure :P
if {([unixtime] - $queue($variable))<86400} {...putquickis for stuff that are probably more urgent than sending your message, like kicks and bans. Useputhelpinstead, or your channel could for example be flooded by someone while the eggdrop is busy with channel message(s). eggwiki.org/Queues#General_principle