This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Trobles whit getting mysql to print

Old posts that have not been replied to for several years.
Locked
b
benzon
Voice
Posts: 11
Joined: Sun Apr 11, 2004 8:24 am

Trobles whit getting mysql to print

Post by benzon »

Code: Select all

set mysql(host) "***"
set mysql(port) "3306"
set mysql(user) "***"
set mysql(pass) "***"
set mysql(data) "***"
set mysql(vers) "2.1" 
package require mysqltcl $mysql(vers)

set channel "#onedaycup #sucsa"

set time 1

if {[string compare [string index $time 0] "!"] == 0} { set timer [string range $time 1 end] } { set timer [expr $time * 60] }
if {[lsearch -glob [utimers] "* gomysql *"] == -1} { utimer $timer gomysql }

proc gomysql {} {
global mysql channel time text timer
mysqluse $mysql(conn) $mysql(data)
foreach chan $channel { 
foreach query [mysqlsel $mysql(conn) "SELECT * FROM cup_reklame ORDER BY id;" -list] { 
putserv "PRIVMSG $chan :[lindex $query 1] " 
} 
putserv "PRIVMSG $chan :Query ended."
}
if {[lsearch -glob [utimers] "* gomysql *"] == -1} { utimer $timer gomysql }
}

putlog "\002Test Script\002"
Is ther one that can help me whit the script cant get it to work the way i want to it shut print every min but it shut be so i can change it fast what to do ? :\
b
benzon
Voice
Posts: 11
Joined: Sun Apr 11, 2004 8:24 am

Post by benzon »

Just had to restart it then it workt baaah
Locked