| View previous topic :: View next topic |
| Author |
Message |
brood Voice
Joined: 01 Sep 2005 Posts: 30
|
Posted: Mon Jan 29, 2007 1:13 pm Post subject: backfill |
|
|
I want to add a backfill code to my script.
I search the forum and I found this:
http://forum.egghelp.org/viewtopic.php?t=9356&highlight=backfill
| Code: |
# limit, in seconds
set maxtime 300
if {[expr [unixtime]-$pretime]>=$maxtime} {
# it's too old, send warning
} {
# normal pretime msg
}
|
Now my pretime is stored like this: 2007-29-01 18:15:00
What must change in the code, to get it to work?
Thanks in advance |
|
| Back to top |
|
 |
r0t3n Owner
Joined: 31 May 2005 Posts: 507 Location: UK
|
Posted: Mon Jan 29, 2007 1:46 pm Post subject: |
|
|
| Code: | | if {[expr [unixtime]-[clock scan $pretime]]>=$maxtime} { |
_________________ r0t3n @ #r0t3n @ Quakenet |
|
| Back to top |
|
 |
brood Voice
Joined: 01 Sep 2005 Posts: 30
|
Posted: Mon Jan 29, 2007 3:59 pm Post subject: |
|
|
thanks.
Is it also possible to let it announce how long the backfill time has past, like Darki_one asked:
(backfill)-(section) xxxx is 10min 12sec. too old
thanks again |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Mon Jan 29, 2007 9:40 pm Post subject: |
|
|
| Code: | if {[set t [expr [unixtime]-[clock scan $pretime]]]>=$maxtime} {
# $time will contain the time that has passed
set time [duration $t]
} |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
nYne Voice
Joined: 25 Feb 2007 Posts: 3
|
Posted: Sun Feb 25, 2007 6:59 pm Post subject: |
|
|
| man read the ***** doc! if you dont have any clue with tcl then stop making prebots, this is the reason why the damn prebot scene has bots which are bad coded and leaking and looping with [censored]! |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sun Feb 25, 2007 8:10 pm Post subject: |
|
|
| nYne wrote: | | man read the ***** doc! if you dont have any clue with tcl then stop making prebots, this is the reason why the damn prebot scene has bots which are bad coded and leaking and looping with [censored]! |
1) You have to change your tone and respect other users.
2) Don't revive old topics. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
|