Author: sparky
Date: Fri Oct 30 19:30:58 2009
New Revision: 10892

Modified:
   toys/stbr/stbr.tcl
Log:
- handle multiple lines
- added aidath


Modified: toys/stbr/stbr.tcl
==============================================================================
--- toys/stbr/stbr.tcl  (original)
+++ toys/stbr/stbr.tcl  Fri Oct 30 19:30:58 2009
@@ -36,17 +36,21 @@
        bind time - "* * * * *" pub:buildstatus
 }
 
-proc pub:buildstatus {nick host hand chan arg} {
+proc putqueue {ver} {
        global queueparser
-       exec $queueparser ac > ac.stat
-       set file [open ac.stat r]
-       gets $file acstat
-       set tistat [exec $queueparser ti]
-       set thstat [exec $queueparser th]
-       putserv "privmsg #pld :$acstat"
-       putserv "privmsg #pld :$tistat"
-       putserv "privmsg #pld :$thstat"
-       putlog "Thrown stats to #pld: $acstat $tistat $thstat"
+       set parsed [exec $queueparser $ver]
+       set lines [split $parsed "\n"]
+       foreach l $lines {
+               putserv "privmsg #pld :$l"
+       }
+       putlog "Thrown stats to #pld: $ver: $parsed"
+}
+
+proc pub:buildstatus {nick host hand chan arg} {
+       putqueue ac
+       putqueue ti
+       putqueue th
+       putqueue aidath
 }
 
 proc help {nick} {
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to