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.

backfill

Help for those learning Tcl or writing their own scripts.
Post Reply
b
brood
Voice
Posts: 30
Joined: Thu Sep 01, 2005 4:12 am

backfill

Post by brood »

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
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

Code: Select all

if {[expr [unixtime]-[clock scan $pretime]]>=$maxtime} {
r0t3n @ #r0t3n @ Quakenet
b
brood
Voice
Posts: 30
Joined: Thu Sep 01, 2005 4:12 am

Post by brood »

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
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

if {[set t [expr [unixtime]-[clock scan $pretime]]]>=$maxtime} {
 # $time will contain the time that has passed
 set time [duration $t]
}
n
nYne
Voice
Posts: 3
Joined: Sun Feb 25, 2007 8:14 am

Post by nYne »

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]!
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

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.
Post Reply