From: Ian Jackson Date: Sun, 10 Jun 2001 16:31:56 +0000 (+0000) Subject: Bugfixes, and production bot. X-Git-Tag: branchpoint-2001-10-09-tell~11 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/ircbot/commitdiff_plain/1ae11f7934181234a916b14a3128eccf29932a44 Bugfixes, and production bot. --- diff --git a/bridge.tcl b/bridge.tcl index 0836203..6f0c9da 100755 --- a/bridge.tcl +++ b/bridge.tcl @@ -24,7 +24,7 @@ proc privmsg_unlogged {p ischan params} { set towrite "\[$n] [lindex $params 1]" } foreach botid $bots { - upvar #0 bot/$botid/bnchan ch + upvar #0 bot/$botid/chan ch puts $ch $towrite } } emsg]} { diff --git a/bridgeconfig.tcl b/bridgeconfig.tcl new file mode 100644 index 0000000..0c63903 --- /dev/null +++ b/bridgeconfig.tcl @@ -0,0 +1,26 @@ +# Configuration for testbot + +set host chiark +set nick bnetd +set ident bnetd +set ownfullname confused +set socketargs {} +set marktime_min 10 +set channel #starcraft + +set bots {bw sc} +source botpass.tcl + +set bot/sc/host bnetd.relativity.greenend.org.uk +set bot/sc/nick scbridge +set bot/sc/pass $botpass +set bot/sc/channel "Starcraft" + +set bot/bw/host bnetd.relativity.greenend.org.uk +set bot/bw/nick bwbridge +set bot/bw/pass $botpass +set bot/bw/channel "Brood War" + +set bnbot bnbot + +source bridge.tcl diff --git a/usebnbot.tcl b/usebnbot.tcl index f7a1ed4..ee7737a 100644 --- a/usebnbot.tcl +++ b/usebnbot.tcl @@ -69,7 +69,7 @@ def_bnbot onread {args} { } elseif {[regexp {^1007 CHANNEL "(.*)"} $l dummy bnchanfn]} { after cancel $bnmbokafter unset bnmbokafter - } elseif {![string length $bnstate]} { + } elseif {[info exists bnchanfn]} { bnbot_event $botid $l } }