X-Git-Url: https://git.distorted.org.uk/~mdw/ircbot/blobdiff_plain/5694c7d4c4585b42a88b9b55fa0b0c9f36af462f..bb72ec7b3d1a2cac3c26fea0c812c17f5559b478:/bridge.tcl diff --git a/bridge.tcl b/bridge.tcl index 64d2d5e..8bac56c 100755 --- a/bridge.tcl +++ b/bridge.tcl @@ -14,7 +14,7 @@ proc privmsg_unlogged {p ischan params} { if {[catch { prefix_nick set text [lindex $params 1] - if {"$line_org_endchar" == "\001"} { + if {![string compare $line_org_endchar "\001"]} { if {[regexp {^\?ACTION (.*)\?$} $text dummy text]} { set towrite "* $n $text" } else { @@ -55,7 +55,7 @@ def_bnbot event {l} { set bnnicks($n) 1 sendprivmsg $channel "[bnnick_clean $n] has joined $bnchanfn." } elseif {[regexp {^1003 LEAVE ([^ ]+) \w+$} $l dummy n]} { - if {"$n" == "$bnnick"} return + if {![ircnick_compare $n $bnnick]} return catch { unset bnnicks($n) } sendprivmsg $channel "[bnnick_clean $n] has left $bnchanfn." } elseif {[regexp {^1004 WHISPER ([^ ]+) \w+ "(.*)"$} $l dummy n text]} { @@ -74,7 +74,7 @@ def_bnbot event {l} { foreach m $pub_msgs { bnbot_writemsg $botid "$n $m" } } } elseif {[regexp {^1001 USER ([^ ]+) \w+} $l dummy n]} { - if {"$n" == "$bnnick"} return + if {![ircnick_compare $n $bnnick]} return set bnnicks($n) 1 } } @@ -86,7 +86,7 @@ proc msg_353 {p c dest type chan nicklist} { catch { unset onchan_nicks } foreach n $nicklist { regsub {^[@+]} $n {} n - if {"$n" == "$nick"} continue + if {![ircnick_compare $n $nick]} continue set onchan_nicks($n) 1 } }