Ok. havn't realy worked with timers much. But I will give it a go!utimer <seconds> <tcl-command>
Description: executes the given Tcl command after a certain number of
seconds have passed
Returns: a timerID
Module: core
Code: Select all
utimer 5 another_proc $nick
Code: Select all
utimer 5 "pushmode $chan -o $who"
As such, the command used, and the time vaklue used, are simple to work out.(u)timer <(seconds)mins> <command>
Code: Select all
utimer 5 [list putserv "MODE $chan -o $nick"]
It's not actually 'bad coding' related per-se.. more like 'bad implementation' by robey and co. in the early eggdrop 1.2.x/1.3.xppslim wrote:The command, is pretty simple too, yet you have to be a little carful, as this is an area, where backdoors/exploits can be left in a script (accidentaly thoug, it's just bad coding practice that causes it).
In your case, you would use somthing like.
Code: Select all
utimer 5 [list putserv "MODE $chan -o $nick"]
Code: Select all
timer 5 "callproc $arg1 $arg2 $arg3"
Code: Select all
timer 5 callproc
Check the tcl-commands.doc and you will find this to be an incorrect statement. The quoting method was fine up to eggdrop1.1.5,ppslim wrote: IEThis is a string, when it wants a list.Code: Select all
timer 5 "callproc $arg1 $arg2 $arg3"
Also, note the "tcl-command" .. not "tcl-commands" or "tcl-command(s)".timer <minutes> <tcl-command>
Description: executes the given Tcl command after a certain number of minutes have passed
timer <minutes> <script>
Description: evaluates the given script after a certain number of
minutes have passed
Returns: a timerID
Module: core
utimer <seconds> <script>
Description: executes the given script after a certain number of
seconds have passed
Returns: a timerID
Module: core
No one said that it was following the same method as fileevent.ppslim wrote:I beleive that "Bad documentation".
If eggdrop is following the same method as fileevent (Tcl provided), with it's (u)timer (eggdrop provided) command, then the implimentation is the same.