This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Help for those learning Tcl or writing their own scripts.
brood
Voice
Posts: 30 Joined: Thu Sep 01, 2005 4:12 am
Post
by brood » Mon Jan 29, 2007 1:13 pm
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=backfill
Code: Select all
# 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
r0t3n
Owner
Posts: 507 Joined: Tue May 31, 2005 6:56 pm
Location: UK
Post
by r0t3n » Mon Jan 29, 2007 1:46 pm
Code: Select all
if {[expr [unixtime]-[clock scan $pretime]]>=$maxtime} {
r0t3n @ #r0t3n @ Quakenet
brood
Voice
Posts: 30 Joined: Thu Sep 01, 2005 4:12 am
Post
by brood » Mon Jan 29, 2007 3:59 pm
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
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Mon Jan 29, 2007 9:40 pm
Code: Select all
if {[set t [expr [unixtime]-[clock scan $pretime]]]>=$maxtime} {
# $time will contain the time that has passed
set time [duration $t]
}
nYne
Voice
Posts: 3 Joined: Sun Feb 25, 2007 8:14 am
Post
by nYne » Sun Feb 25, 2007 6:59 pm
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]!
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Sun Feb 25, 2007 8:10 pm
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.