chiark / gitweb /
Allow differing local addresses.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 31 Jan 2001 16:56:01 +0000 (16:56 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 31 Jan 2001 16:56:01 +0000 (16:56 +0000)
blight.tcl
bot.tcl

index 4825da32b139804f2946fb2453d05560346872aa..6092f9be9177ced04936f02319e8dfdf45ec2bba 100644 (file)
@@ -4,5 +4,7 @@ set host chiark
 set nick Blight
 set ownfullname "here to Help"
 set ownmailaddr blight@chiark.greenend.org.uk
+#set socketargs {-myaddr permutation-city.greenend.org.uk}
+set socketargs {}
 
 source bot.tcl
diff --git a/bot.tcl b/bot.tcl
index 876a2383a2e4136827604181ce78a4d5fc5c2039..ad5c908b336f6954fb997381a4c44dbea4f8a3c5 100755 (executable)
--- a/bot.tcl
+++ b/bot.tcl
@@ -1505,11 +1505,11 @@ proc fail {msg} {
 }
 
 proc ensure_connecting {} {
-    global sock ownfullname host port nick
+    global sock ownfullname host port nick socketargs
     global musthaveping_ms musthaveping_after
     
     if {[info exists sock]} return
-    set sock [socket $host $port]
+    set sock [eval socket $socketargs [list $host $port]]
     fconfigure $sock -buffering line
     fconfigure $sock -translation crlf