chiark / gitweb /
Bugfixes to privacy
[ircbot.git] / usebnbot.tcl
index 8e227c6a8a00eb6089150c1222443cd1751844f8..b110b28c6ec9d5adb674b159e59459cb88d08cab 100644 (file)
@@ -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
     }