Code:
proc basicreplace {strin section} {
#putlog "proc basicreplace"
global sitename
set output [replacevar $strin "%sitename" $sitename]
set output [replacevar $output "%bold" "\002"]
set output [replacevar $output "%color" "\003"]
set output [replacevar $output "%uline" "\037"]
if { [string match $section "Stuff"] } { set section \00311$section\003 }
if { [string match $section "old stuff"] } { set section \00314$section\003 }
if { [string match $section "text"] } { set section \00313$section\003 }
set output [replacevar $output "%section" $section]
return "$output"
}
try this.