Code: Select all
timer [expr lineNumber +1] putserv "privmsg $channel :hello world!"
Code: Select all
proc pub:send_nfo {nick host hand chan text} {
putlog 1
global mysql
set output [mysqlsel $mysql "SELECT * FROM nfo_cache WHERE status = '0'" -list]
putlog 2
foreach row $output {
putlog 3
set site [lindex $row 1]
putlog 4
set section [lindex $row 2]
putlog 5
set rls [lindex $row 3]
putlog 6
putquick "PRIVMSG #pre.nfo-feed :!fetch_nfo $site $section $rls"
putlog 7
mysqlexec $mysql "UPDATE nfo_cache SET status = '1'"
}
}
utimer uses seconds, timer uses minutes.TCL_no_TK wrote:There is a few. puthelp which will only send 1 line at a time, you could also looking into using timer or even time if you wanted to do it in minuets. timer uses seconds, so you could do after each line [expr lineNumber +1]check the docs @ http://eggheads.org/support/egghtml/1.6 ... mands.html.Code: Select all
timer [expr lineNumber +1] putserv "privmsg $channel :hello world!"
Code: Select all
proc pub:send_nfo {nick host hand chan text} {
global mysql
set output [mysqlsel $mysql "SELECT * FROM nfo_cache WHERE status = '0'" -list]
set c 10
foreach row $output {
set c [expr $c +5]
utimer $c putserv "PRIVMSG #pre.nfo-feed :!fetch_nfo [lindex $row 0] [lindex $row 1] [lindex $row 2]"
}; mysqlexec $mysql "UPDATE nfo_cache SET status = '1'"
}
Code: Select all
set site [lindex $row 0]
set section [lindex $row 1]
set rls [lindex $row 2]
You're incorrectly using the [utimer] command.TCL_no_TK wrote:sorry, type'o *utimer.
Try this:Also try usingCode: Select all
proc pub:send_nfo {nick host hand chan text} { global mysql set output [mysqlsel $mysql "SELECT * FROM nfo_cache WHERE status = '0'" -list] set c 10 foreach row $output { set c [expr $c +5] utimer $c putserv "PRIVMSG #pre.nfo-feed :!fetch_nfo [lindex $row 0] [lindex $row 1] [lindex $row 2]" }; mysqlexec $mysql "UPDATE nfo_cache SET status = '1'" }
That should send the data to the channel every 10,15,20,25,30 mins ...etcCode: Select all
set site [lindex $row 0] set section [lindex $row 1] set rls [lindex $row 2]
P.S i dont know the first thing about mysql, n stuff but as i haven't changed anything other than the lindex(s); it shouldn't affect anything mysql related.
Code: Select all
utimer $c [list putserv "PRIVMSG #pre.nfo-feed :!fetch_nfo [lindex $row 0] [lindex $row 1] [lindex $row 2]"]