Posted to tcl by Surmaelk at Thu Jan 09 18:45:59 GMT 2020view raw

  1. The error i get is: can't read "line": no such variable
  2. #RLSLIST
  3. bind pub -|- !list rlslist
  4. proc rlslist {nick uhost handle chan text} {
  5. if {![channel get [string tolower $chan] rlsList]} { return 0 }
  6. variable dbInfo
  7. if {[scan $dbInfo %s%s%s%s hostname username password database] != 4} return
  8. set line [::mysql::escape $line]
  9. set nick [::mysql::escape $nick]
  10. set con [::mysql::connect -host $hostname -user $username -password $password -db $database]
  11. set query [::mysql::query $con "SELECT line,nick,timestamp FROM releases ORDER BY $line"]
  12. if {[::mysql::fetch $query]==""} {
  13. putquick "PRIVMSG $chan : \0034Nothing in the book :-( \003"
  14. } else {
  15. ::mysql::map $con { line nick timestamp } {
  16. putquick "PRIVMSG $chan :\0037something came to the book\003:\0039 $line\003 from $nick"
  17. }
  18. }
  19. ::mysql::endquery $con
  20. ::mysql::close $con
  21. }