From: Ian Jackson Date: Fri, 8 Apr 2005 14:40:55 +0000 (+0000) Subject: new spoutchan client X-Git-Url: https://git.distorted.org.uk/~mdw/ircbot/commitdiff_plain/1f7559c991258543eac715b40167e23414dfae04 new spoutchan client --- diff --git a/spoutchan.tcl b/spoutchan.tcl new file mode 100755 index 0000000..cb601ab --- /dev/null +++ b/spoutchan.tcl @@ -0,0 +1,27 @@ +#!/usr/bin/tclsh8.4 +# usage: +# cd ../ircbot +# soemthing | ./spoutchan.tcl SERVER PORT NICK IDENT FULLNAME CHANNEL + +source irccore.tcl + +manyset $argv host port nick ident ownfullname channel + +proc connected {} { + global channel + sendout JOIN $channel +} +proc new_event {} { } +proc privmsg_unlogged {args} { } +proc msg_366 {args} { + fconfigure stdin -blocking no + fileevent stdin readable stdinread +} +proc stdinread {} { + global channel + if {[gets stdin l] < 0} return + sendprivmsg $channel $l +} + +ensure_connecting +vwait forever