# 0 = unencoded # 1 = encoded set last_char 0 foreach letter [split $a_chan_crypt_quote($chan) ""] { if {[info exists cur_solved($letter)]} { incr matches # If last char was unencoded if {$last_char == 0} { append quote [string toupper "${solved_encoding}$cur_solved($letter)"] set last_char 1 } else { append quote [string toupper "$cur_solved($letter)"] } } else { if {[regexp -all {[a-z]} $letter] != 0} { append quote "${unsolved_encoding}$letter\017" } else { append quote $letter } } }