Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- roc pub:works {nick uhost handle channel arg} {
- if {![info exists eplay_db] || ([info exists eplay_db] && [mysqlstate $eplay_db] == "7" || [info exists eplay_db] && [mysqlstate $eplay_db] == "UNCONNECTED")} {
- set eplay_db [::mysql::connect -host "localhost" -user "eplay" -password "..." -db "eplay"]
- }
- #if {![info exists db(sqlhand)] || ([info exists db(sqlhand)] && [mysqlstate $db(sqlhand)] == "7" || [info exists db(sqlhand)] && [mysqlstate $db(sqlhand)] == "UNCONNECTED")} {
- #set db(sqlhand) [mysqlconnect -host $eplay(dbhost) -user $eplay(dbuser) -password $eplay(dbpass) -db $eplay(dbname)]
- #}
- global eplay_db
- if {[::mysql::sel $eplay_db {SELECT * FROM works}] > 0} {
- ::mysql::map $eplay_db {auth status link} {
- putserv "PRIVMSG $channel :\002\00314,1\[\0039«\002\0030 By $auth - (\00304$status\0030) - $link \002\0039,1»\00314]"
- }
- } else {
- putserv "PRIVMSG $channel :\002\00314,1\[\0039«\002\0030 Não há works disponíveis neste momento. \002\0039,1»\00314]"
- }
- }
- bind pub - !works pub:works
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement