|
|
@ -112,17 +112,18 @@ var commandsCommand = Command{
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// var broadcastCommand = &Command{
|
|
|
|
func BroadcastCommand(sys *System) Command {
|
|
|
|
// name: "broadcast",
|
|
|
|
return Command{
|
|
|
|
// help: "broadcast a message for all systems to hear",
|
|
|
|
name: "broadcast",
|
|
|
|
// handler: func(conn *Connection, args ...string) {
|
|
|
|
help: "broadcast a message for all systems to hear",
|
|
|
|
// msg := strings.Join(args, " ")
|
|
|
|
handler: func(c *Connection, args ...string) {
|
|
|
|
// system := conn.System()
|
|
|
|
msg := strings.Join(args, " ")
|
|
|
|
// b := NewBroadcast(system, msg)
|
|
|
|
b := NewBroadcast(sys, msg)
|
|
|
|
// log_info("player %s send broadcast from system %s: %v\n", conn.Name(), system.Label(), msg)
|
|
|
|
log_info("player %s send broadcast from system %v: %v\n", c.Name(), sys, msg)
|
|
|
|
// currentGame.Register(b)
|
|
|
|
currentGame.Register(b)
|
|
|
|
// },
|
|
|
|
},
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// var colonizeCommand = &Command{
|
|
|
|
// var colonizeCommand = &Command{
|
|
|
|
// name: "colonize",
|
|
|
|
// name: "colonize",
|
|
|
|