startup.sh: Run screen(1) as admin, sudo(8) to ircbot user.
[ircbot] / spoutchan.tcl
index cb601ab..3bdba28 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/tclsh8.4
+#!/usr/bin/tclsh8.2
 # usage:
 #   cd ../ircbot
 #   soemthing | ./spoutchan.tcl SERVER PORT NICK IDENT FULLNAME CHANNEL
@@ -12,13 +12,14 @@ proc connected {} {
     sendout JOIN $channel
 }
 proc new_event {} { }
-proc privmsg_unlogged {args} { }
+proc privmsg_unlogged {args} { return 1 }
 proc msg_366 {args} {
     fconfigure stdin -blocking no
     fileevent stdin readable stdinread
 }
 proc stdinread {} {
     global channel
+    if {[eof stdin]} { exit 0 }
     if {[gets stdin l] < 0} return
     sendprivmsg $channel $l
 }