chiark / gitweb /
handle eof on stdin
authorijackson <ijackson>
Fri, 8 Apr 2005 14:45:02 +0000 (14:45 +0000)
committerijackson <ijackson>
Fri, 8 Apr 2005 14:45:02 +0000 (14:45 +0000)
spoutchan.tcl

index cb601abbb2886128d3eb3c777df00d6b7b30c80e..b350563a0f0b662ff02e2cf5765226b20dda3940 100755 (executable)
@@ -19,6 +19,7 @@ proc msg_366 {args} {
 }
 proc stdinread {} {
     global channel
+    if {[eof stdin]} { exit 0 }
     if {[gets stdin l] < 0} return
     sendprivmsg $channel $l
 }