Add config dir to default load path
[clinton/bobotpp.git] / examples / scripts / uptime
1 ;;; -*- Scheme -*-
2 (use-modules (ice-9 popen)
3 (ice-9 rdelim))
4
5 (define (uptime c)
6 (let* ((p (open-input-pipe "/usr/bin/uptime"))
7 (s (read-line p)))
8 (close-pipe p)
9 (bot:say c s)))
10
11 (bot:addcommand "uptime" uptime #t 0 1)