first sorry for my english
i dont know if i`m on the right place here, but i have some question/problem with a tcl that i try to script
I want that my Bot(Eggdrop) post every 30 Minutes news message that is stored in my Database and put it in my channel #news, it dont work
Here my code
Code: Select all
load /usr/lib/libmysql/libmysqltcl3.05.so
set db_handle [mysql::connect -host localhost -user XXX -password XXXX -db XXX]
putlog "My first script successfully loaded"
if {![info exists myproc_running]} {
timer 30 myproc
set myproc_running 1
}
proc myproc {channel} {
set sql "SELECT * FROM news ORDER BY id desc limit 1"
set result [mysqlquery $db_handle $sql]
puthelp "PRIVMSG $channel: $news"
timer 30 myproc
return 1
}