See 'after' and/or 'vwait' in the TCL manpages.Ofloo wrote:how do i make a while delay ? for like lets say 15 sec and then go on to the next one .. ?
Code: Select all
set a [clock seconds]
while {[expr [clock seconds] - $a] < 15} {
# do nothing ...
}
Code: Select all
while {$a <= 100} {
}
"$a <= 100" is not TIME.. and inside i assume you are incrementing a.. It takes TCL (and the processor you are executing the code on) alot less than a second to do a math function.. Thus, you NEED the clock expression given to you before. There is nothing to apply, read what I told you in the previous post.Ofloo wrote:ok that is it supposed to do but .. tryed what you discripbed could you apply it to that string cause its not working at all no error ..? oh yes i put something in the while of courseCode: Select all
while {$a <= 100} { }
so that is not it hehe
witch means 10 - 10 < 15 so if 0 < 15 witch always is .. just wondering how this could create a delayed loop ? if i understand wellset a [clock 10]
while {[expr [clock 10] - $a] < 15} {
...
}
Why did you change [clock seconds] to [clock 10] ???????????????Ofloo wrote:ive used timers, after, vwait ..and so on ive tryed on using it ive been trying it for 2 days so :/ i can say this it won't work :p,... ill try the cloak thing now altho it looks funny cause:
witch means 10 - 10 < 15 so if 0 < 15 witch always is .. just wondering how this could create a delayed loop ? if i understand wellset a [clock 10]
while {[expr [clock 10] - $a] < 15} {
...
}
and clock from what i can understand from it is to decrypt or convert if you want unixtime to normal time ??? so euhm .. ?
could you plz apply an working example and xplain what it means in human langue ?
Code: Select all
proc test:dcc {hand idx arg} {
set a [clock seconds]
while {[expr [clock seconds] - $a] < 15} {
putlog "testing"
}
}
Some people for some reason or other, sometimes need/want the bot to be unresponsive for an amount of time, which is what I gathered from the initial request.ppslim wrote:You need to review how you put your logic down in a script.
Your logflke is being flooded with putlog requests.
The while loop is designed to keep looping until 15 seconds have passed. Thus, the putlog command is called as many times as possible until then.
It is very unwise to use the while loop method anyway.
TImers will work, you are obviously using them wring.
If that was the case (although it is possible it isn't the case, as to every rule there is an exception),ppslim wrote:In which case a timed removal fo the ignore *!*@* would sufice.
There are other methods too, including a RAW bind that selects only specific messages through (pings and such), until you wish this block removed.
To make a bot unresposive to users is one thing. To make it unresposive to a server is another.
While a bot can qucikly recorver from this kind of blocking, if a line is received that caused it to block again during that time, the bot could quickly be queuring blocks requests after block requests. THis will lead to a PING timeout, which I am guessing they don't want.