#sever info
set host "(HOST)"
set user "(USER)"
set passwd "(PASS)"
set db "(DATABASE)"
#Bind
bind pubm - "% !feed sl0rd" feed_sl0rd
## Load the mysqltcl package
package require mysqltcl
proc feed_sl0rd {nick uhost hand chan topic} {
global host user passwd db
if {$chan == "#sops"} then {
set con [::mysql::connect -host $host -user $user -password $passwd]
set res [::mysql::use $db]
if {$res != 0} {
putlog "could not connect... "
}
::mysql::exec $con "UPDATE `streameronline` ( `streamerusc` ) VALUES (http://ustream.tv/e06,Q7h6Mbuey8aOxTltiQUyBKjIDFx4.usc)"
PUTHELP "PRIVMSG $chan Update successfull"
::mysql::close $con
}
}
putlog "Script loaded: Stream Switcher"
Last edited by SL0RD on Mon Oct 27, 2008 9:20 pm, edited 1 time in total.
Could you post the full error message, and if possible/reproducable, the content of the global variable errorInfo at the time of the error?
At a quick glance however, I would guess that the error is related to your ::mysql::use command, which actually expects two arguments, not one; namely "handle" and "database" (handle is not to be confused with handles in eggdrop).
Last edited by nml375 on Tue Oct 28, 2008 9:34 am, edited 1 time in total.