chiark / gitweb /
Bugfixes, and production bot.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 10 Jun 2001 16:31:56 +0000 (16:31 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 10 Jun 2001 16:31:56 +0000 (16:31 +0000)
bridge.tcl
bridgeconfig.tcl [new file with mode: 0644]
usebnbot.tcl

index 0836203d21038923a4ae3ef1fecfbf1386f22a43..6f0c9daec3ec2214d84a1c7a7a69e10146f536ea 100755 (executable)
@@ -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 (file)
index 0000000..0c63903
--- /dev/null
@@ -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
index f7a1ed4ca9011a4c8083876eb956cd85bcb708e2..ee7737ac3063f47d0caeb68a05e1a23f12ddef7d 100644 (file)
@@ -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
     }
 }