(use-modules (ice-9 popen))

(define (uptime c)
  (let* ((p (open-input-pipe "/usr/bin/uptime"))
         (s (read-line p)))
  (close-pipe p)
  (bot-say c s)))

(bot-addcommand "uptime" uptime #t 0 1)
