X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/ircbot/blobdiff_plain/0d3ea3aa52f4a62b4f8a64892bfbe579164eb26d..6b33d29a2ffb4244bae6b51b2114039e2edb54ba:/usebnbot.tcl diff --git a/usebnbot.tcl b/usebnbot.tcl index 8e227c6..b110b28 100644 --- a/usebnbot.tcl +++ b/usebnbot.tcl @@ -42,12 +42,12 @@ def_bnbot writemsg {str} { def_bnbot onread {args} { global channel - if {[gets $bnchan l] == -1} { fail "bot $bot EOF/error on input" } + if {[gets $bnchan l] == -1} { fail "bot $botid EOF/error on input" } if {[regexp {^1005 TALK ([^ ]+) \w+ \"(.*)\"$} $l dummy n text]} { sendprivmsg $channel "\[$n] $text" return } elseif {[regexp {^1023 EMOTE ([^ ]+) \w+ \"(.*)\"$} $l dummy n text]} { - if {"$n" == "$bnnick"} return + if {![ircnick_compare $n $bnnick]} return sendprivmsg $channel "* $n $text" return }