Posted to tcl by jdc at Wed Jul 11 09:52:18 GMT 2012view raw

  1. proc pub:temp {nick host hand chan text} {
  2. if {$text != {} && [string tolower $text] != {netburst}} {
  3. return }
  4. set pid [open "|sysctl -a hw.sensors | grep cpu0" r]
  5. while {[gets $pid line] != -1} {
  6. puthelp "PRIVMSG $chan :[lindex [split $line =] 1]"
  7. }
  8. close $pid
  9. }
  10. bind pub - !temp pub:temp