}
proc note_topic {showoff whoby topic} {
- if {[string length $whoby]} {
- set msg "FYI, $whoby has changed the topic on $showoff"
- } else {
- set msg "FYI, I have reset the topic on $showoff"
- }
+ set msg "FYI, $whoby has changed the topic on $showoff"
if {[string length $topic] < 160} {
append msg " to $topic"
} else {
global nick
upvar #0 chan_nicks($lchan) nlist
if {[llength $nlist] != 1} return
- if {"[lindex $nlist 0]" != "$nick"} return
+ if {"[lindex $nlist 0]" != "[irctolower $nick]"} return
if {[chandb_exists $lchan]} {
set mode [chandb_get $lchan mode]
if {"$mode" != "*"} {
set topic [chandb_get $lchan topicset]
if {[string length $topic]} {
sendout TOPIC $lchan $topic
- note_topic $lchan {} $topic
}
} else {
sendout PART $lchan