I have a problem with the topic changing
I have this in my script:
bind pub -|- !topic pub:topic
bind pub -|- !t pub:topic
proc pub:topic { nick host handle chan text } {
global botnick
if { [botisop $chan] } {
if { [onchan $nick $chan] && [matchattr $handle o|C $chan] } {
set arg [lindex $text 0 ]
set newtopic [lrange $text 1 end]
if { $arg != "+" } {
set newtopic [lrange $text 0 end]
if { $newtopic == "" } {
putserv "TOPIC $chan :"
} else {
putserv "TOPIC $chan :[join $newtopic]"
}
} else {
set curtopic [topic $chan]
putserv "TOPIC $chan :$curtopic | [join $newtopic]"
}
} else {
putserv "NOTICE $nick : You haven't permission for this!"
}
flushmode $chan
} else {
putserv "NOTICE $nick : I'm not opped on $chan"
}
}
but when I do: !t \x01\x02 it will replace that binary codes with the representing characters, and I don't want that. Also when I do: !t {hello}
it will replace it with only hello...
How can I fix it?
P.S.:
Sorry for my english, and maybe too lame question, but I'm not very skilled at coding at all
