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

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