Implement a command queue on the world
Not currently executed
This commit is contained in:
parent
e3ce87e964
commit
0a0a32cf58
6 changed files with 120 additions and 15 deletions
|
@ -146,7 +146,7 @@ func HandleCommand(s *Server, vars map[string]string, b io.ReadCloser, w io.Writ
|
|||
} else if inst, err := s.accountant.GetRover(id); err != nil {
|
||||
response.Error = fmt.Sprintf("Provided account has no rover: %s", err)
|
||||
|
||||
} else if err := s.world.Execute(inst, data.Commands...); err != nil {
|
||||
} else if err := s.world.Enqueue(inst, data.Commands...); err != nil {
|
||||
response.Error = fmt.Sprintf("Failed to execute commands: %s", err)
|
||||
|
||||
} else {
|
||||
|
|
|
@ -114,7 +114,7 @@ func (s *Server) Initialise() (err error) {
|
|||
}
|
||||
|
||||
// Addr will return the server address set after the listen
|
||||
func (s Server) Addr() string {
|
||||
func (s *Server) Addr() string {
|
||||
return s.address
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue