diff options
author | Benny Morrison <benmorrison@ttm.sh> | 2019-03-16 00:15:57 -0400 |
---|---|---|
committer | Benny Morrison <benmorrison@ttm.sh> | 2019-03-16 00:15:57 -0400 |
commit | ff4bdd49040864ac4b6e9e8298bb9d5fc59453e7 (patch) | |
tree | 98fac97f6e277401b20472c032c6b2cb1d20fa6a | |
parent | 394f3b5df7809371891e5371943c9665d97ff4a9 (diff) | |
download | goofbot-ff4bdd49040864ac4b6e9e8298bb9d5fc59453e7.tar.gz |
added !users to display connected users on server
-rw-r--r-- | main.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/main.go b/main.go index 23cb061..1e2b94a 100644 --- a/main.go +++ b/main.go @@ -54,11 +54,13 @@ func main() { c.Cmd.Reply(e, uptime) return } - //TODO: - // currently connected users - // uptime - // load - // + // respond with currently connected users + // TODO: prepend names with _ to avoid pings in irc + if strings.HasPrefix(e.Last(), "!users") { + users := exec.Command("who", "-q") + c.Cmd.Reply(e, users) + return + } }) // if err is not nothing, eg, if there's an error |