I'm trying to make display the contents of a if statement only if the if inside which is it, is returning the desired value. However this doesn't work, so I guess it's not how you do it in TCL. Any advice would be appreciated.
if {$firstq == 1} {
set sql "SELECT * FROM users WHERE username='$text' AND ircban='yes' LIMIT 1"
set result [mysqlsel $db_handle $sql]
if{$result == 1} {
putquick "NOTICE $nick :User is banned."
} elseif{$result == 0} {
putquick "NOTICE $nick :User is not banned."
}