![]() ![]() Using /timertest -e to execute this one early causes it to show the true interval. var %delay 123 | timertest 1 %delay echo -a T+ $!duration( $!calc( $!time - $ctime )) message | timertest However, if you use the command "/timertest -e" it will execute the timer early, yet it will still show the original calculation of the T+interval. This launches a timer to execute 123 seconds into the future, and calculates the display now. var %delay 123 | timertest 1 %delay echo -a T+ $duration(%delay) message If you have calculations of timer intervals, it's best to either pass parameters to the alias for it to make calculations using them, or to do the calculation at the time you launch the timer. The 3rd one shields the name of the identifier so the "$asctime" string displays in the echo, without evaluating at either time. The 2nd one puts the name of the identifier there causing it to evaluate when the timer executes. The first one evaluates as you launch the timer, showing the time when you launched it. This shows you the 3 different ways the above identifier is placed into the timer command. timertest 1 5 echo -a $asctime vs $ $+ asctime vs $unsafe($ $+ asctime) | timertest Especially be careful against including $1- in a timer if that $1- represents a string typed by someone else in a chat message. Basically, you should avoid putting text into a timer containing names of identifiers and names of variables, unless you know what you're doing. ![]() The link about mSL Injection warns against risky behavior with timers. If you want them to trigger at specific intervals after a specific time, you would create an alias containing all the timers, and launch them all at the same time either by typing the /name_of_the_alias in the channel's editbox or by launching a timer at a specific timer which executes that alias. You can have timers which trigger in N seconds-from-now rather than a specific time in the future. If you had looked at the link in the post to which you replied, you would have seen the answer. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |