Posted to tcl by emiliano at Tue May 31 18:36:54 GMT 2022view raw
- Open console and type [set Options(BridgeNames)]
- The bug is in the proc ::tkchat::CheckVersionDone
- Here's a patch
- Index: apps/tkchat/tkchat.tcl
- ==================================================================
- --- apps/tkchat/tkchat.tcl
- +++ apps/tkchat/tkchat.tcl
- @@ -9985,22 +9985,22 @@
- }
- proc ::tkchat::CheckVersionDone {tok} {
- variable version
- global Options
- - set meta [set [set tok](meta)]
- - if {[set ndx [lsearch -exact $meta X-LOLCATZ]] != -1} {
- - set Options(tagline) "LOLCat says \"[lindex $meta [incr ndx]]\""
- + set meta [http::meta $tok]
- + if {[dict exists $meta X-LOLCATZ]} {
- + set Options(tagline) "LOLCat says \"[dict get $meta X-LOLCATZ]\""
- if {!$Options(HateLolcatz)} {
- - after 10000 [list [namespace origin addStatus] 0 $::Options(tagline)]
- + after 10000 [list [namespace origin addStatus] 0 $Options(tagline)]
- }
- }
- # This permits the website to re-define the names of current bridges.
- - if {[set ndx [lsearch -exact $meta X-BridgeNames]] != -1} {
- - set bridges [lindex $meta [incr ndx]]
- - if {[llength $bridges] > 0} {
- - lappend Options(BridgeNames) {*} $bridges
- + if {[dict exists $meta X-BridgeNames]} {
- + set bridges [dict get $meta X-BridgeNames]
- + if {[llength $bridges]} {
- + set Options(BridgeNames) $bridges
- }
- }
- set url [string trim [http::data $tok]]
- if {[regexp {1\.(\d+)} $version -> current]
- && [regexp {tkchat-1\.(\d+)} $url -> latest]} {