I currently have a script on the bot that pulls a text file from the server and displays the contents to the channel when it hears the trigger command "!info" on the channel.
The problem I'm having is I wish to add a delay in the script but I cant seem to get the Utimer to work.
I want it so someone in the channel types !info then there is a delay which I can specify before the bot forwards the info to the channel.
The error I was getting was: Tcl error [moo]: wrong # args: should be "utimer seconds command"
current code I am using (without the utimer bits) is:
Code: Select all
package require http
bind pub - !info moo
proc moo {n u h c t} {
set x [::http::geturl http://www.somewebsite.com/test.txt]
foreach e [split [::http::data $x] \n] {puthelp "privmsg $c :$e"}
::http::cleanup $x
}
Any help would be very much appreciated!
-Billip