about summary refs log tree commit diff stats
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/main.go b/main.go
index 72c0c9f..23cb061 100644
--- a/main.go
+++ b/main.go
@@ -3,6 +3,7 @@ package main
 import (
 	"log"
 	"os"
+	"os/exec"
 	"strings"
 	"time"
 
@@ -47,6 +48,12 @@ func main() {
 			c.Cmd.Reply(e, "Creator: ~a h r i m a n~ :: I'm the assistance bot for tilde.institute. Commands: !hello")
 			return
 		}
+		// respond with uptime / load
+		if strings.HasPrefix(e.Last(), "!uptime") {
+			uptime := exec.Command("uptime")
+			c.Cmd.Reply(e, uptime)
+			return
+		}
 		//TODO:
 		// currently connected users
 		// uptime