Change how server address is specified

now you spell it as such:

gobot -addr wss://hackerbots.us
gobot -addr ws://localhost:8666
This commit is contained in:
sm
2016-07-13 19:46:08 -06:00
parent 35cb8431f6
commit c21e0c5582
3 changed files with 7 additions and 12 deletions
+2 -4
View File
@@ -11,8 +11,7 @@ import (
"hackerbots.us/server"
)
var serverHostname = flag.String("server", "localhost", "server hostname")
var port = flag.Int("port", 8666, "server port")
var addr = flag.String("addr", "ws://localhost:8666", "server hostname")
var forceJSON = flag.Bool("json", false, "force json encoding")
func main() {
@@ -26,8 +25,7 @@ func main() {
}
c := &client.Client{
Server: *serverHostname,
Port: *port,
Server: *addr,
Name: "bspect",
GameId: gameId,
ForceJSON: *forceJSON,
+2 -4
View File
@@ -23,8 +23,7 @@ var weaponSpeed = flag.Int("wspeed", 50, "weapons speed")
// XXX: add TurnSpeed, WeaponDamage, WeaponSpeed
var serverHostname = flag.String("server", "localhost", "server hostname")
var port = flag.Int("port", 8666, "server port")
var addr = flag.String("addr", "ws://localhost:8666", "server hostname")
var botname = flag.String("name", "gobot", "the name that other players will see")
var forceJSON = flag.Bool("json", false, "force json encoding")
var botType = flag.String("bot", "simple", "which Bot")
@@ -40,8 +39,7 @@ func main() {
}
c := &client.Client{
Server: *serverHostname,
Port: *port,
Server: *addr,
Name: *botname,
GameId: gameId,
// XXX: update with missing fields