added 'bal' command

slack
Jordan Orelli 10 years ago
parent 0ad3aeca17
commit a34c2bc64f

@ -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 { func isCommand(name string) bool {
_, ok := commandRegistry[name] _, ok := commandRegistry[name]
return ok return ok
@ -297,7 +305,8 @@ func setupCommands() {
registerCommand(mineCommand) registerCommand(mineCommand)
registerCommand(mkBombCommand) registerCommand(mkBombCommand)
registerCommand(nearbyCommand) registerCommand(nearbyCommand)
registerCommand(playersCommand)
registerCommand(scanCommand) registerCommand(scanCommand)
registerCommand(winCommand) registerCommand(winCommand)
registerCommand(playersCommand) registerCommand(balCommand)
} }

Loading…
Cancel
Save