about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2020-04-03 02:48:37 -0400
committerBen Morrison <ben@gbmor.dev>2020-04-03 02:49:28 -0400
commitc8c80becf658693e4d5b4979c988e47beb9f5e11 (patch)
tree1271f4e8272b147ced3a6670c645c2f17f120511
parent2c19c5e319e595a55f416fe0d706d44fc7e76b3c (diff)
downloadgoofbot-c8c80becf658693e4d5b4979c988e47beb9f5e11.tar.gz
changed how user account count message is formatted
using full path to uptime command
-rw-r--r--main.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/main.go b/main.go
index e7e97e7..e92dfb5 100644
--- a/main.go
+++ b/main.go
@@ -1,4 +1,4 @@
-package main // import "github.com/gbmor/goofbot"
+package main
 
 import (
 	"bytes"
@@ -10,7 +10,6 @@ import (
 	"os"
 	"os/exec"
 	"os/signal"
-	"strconv"
 	"strings"
 	"time"
 
@@ -138,7 +137,7 @@ func main() {
 
 		// respond with uptime / load
 		if strings.HasPrefix(e.Last(), "!uptime") {
-			uptime := exec.Command("uptime")
+			uptime := exec.Command("/usr/bin/uptime")
 			var out bytes.Buffer
 			uptime.Stdout = &out
 			err := uptime.Run()
@@ -191,7 +190,8 @@ func main() {
 				return
 			}
 
-			c.Cmd.Reply(e, strconv.Itoa(len(userdirs))+" user accounts on ~institute")
+			msg := fmt.Sprintf("%v user accounts on ~institute", len(userdirs))
+			c.Cmd.Reply(e, msg)
 			return
 		}