chiark / gitweb /
handle eof on stdin
[ircbot.git] / 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
 }