Advertisement
Guest User

Untitled

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