here's the output conditionals. it works fine like i said except when the error is output. it's context is: \002No photos found...\002 is there anyway i can use regex or something to check it? if {[llength $results] == 1} { if {$results == "\002No photos found...\002"} { putserv "PRIVMSG $chan :No photos found..." exit } foreach image [lindex $results 0] { putserv "PRIVMSG $chan :$image" } } }