From a34c2bc64fb1da0e2c944d1818b2594b4b8cf4f6 Mon Sep 17 00:00:00 2001 From: Jordan Orelli Date: Fri, 14 Nov 2014 17:41:31 -0500 Subject: [PATCH] added 'bal' command --- commands.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/commands.go b/commands.go index 32dc8e2..1a14678 100644 --- a/commands.go +++ b/commands.go @@ -249,6 +249,14 @@ var playersCommand = &Command{ }, } +var balCommand = &Command{ + name: "bal", + help: "displays your current balance in space duckets", + handler: func(conn *Connection, args ...string) { + fmt.Fprintln(conn, conn.money) + }, +} + func isCommand(name string) bool { _, ok := commandRegistry[name] return ok @@ -297,7 +305,8 @@ func setupCommands() { registerCommand(mineCommand) registerCommand(mkBombCommand) registerCommand(nearbyCommand) + registerCommand(playersCommand) registerCommand(scanCommand) registerCommand(winCommand) - registerCommand(playersCommand) + registerCommand(balCommand) }