Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate arma-manager module #1

Open
2 of 6 tasks
Saborknight opened this issue Jul 17, 2019 · 6 comments
Open
2 of 6 tasks

Integrate arma-manager module #1

Saborknight opened this issue Jul 17, 2019 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@Saborknight
Copy link
Member

Saborknight commented Jul 17, 2019

Dahlgren implemented functionality that allowed easy starting of an arma 3 server (https://github.com/Dahlgren/node-arma-server). He doesn't necessarily allows stopping it, but it is supposed to return the PID of the executable! We can use that to stop and check if the process is running.
Otherwise, checking the port listener and then grabbing the PID related there is another option.

Controls to implement:

  • start
  • stop
  • status
  • restart - Is there a way we can send chat commands to the server? Then we could imitate #restart
  • update - Updates the game and any mods that are out of date. Use the FASTER XML to check on if anything is out of date? Might not work since FASTER is not guaranteed to be open or have checked for out-of-date mods in a while
  • attendance - List the players who attended for the last event. An event is described as any session where the players were connected at any point during the 1900-2100 time period on a Wednesday, Thursday or Sunday
  • add_mod - Adds a mod to the start parameters of a particular server
  • remove_mod - Removes a mod from the start parameters of a particular server
  • add_server_mod
  • remove_server_mod
@Saborknight Saborknight added the enhancement New feature or request label Jul 17, 2019
@Saborknight Saborknight self-assigned this Jul 17, 2019
@Saborknight
Copy link
Member Author

Found a game queryer to solve all our problems: https://www.npmjs.com/package/gamedig
This includes not just Arma 3, but also Space Engineers, Teamspeak, Garry's mod, Minecraft, and more, see the games list here: https://www.npmjs.com/package/gamedig#games-list

@Saborknight
Copy link
Member Author

So, this game query-er doesn't do anything except return information on the game server instance. I should have guessed from the name... Good for the status command, but that's pretty much it.
Back to Dahlgren!

@Saborknight
Copy link
Member Author

Updated the feature list of commands

@Saborknight
Copy link
Member Author

For the servers to run independently of this driver, I need to add a pull request to add

{
    detached: true,
    stdio: 'ignore'
}

to https://github.com/Dahlgren/node-arma-server/blob/e1f1e75888491c4fcb330f25b61818ae7397609f/src/server.js#L112 and https://github.com/Dahlgren/node-arma-server/blob/e1f1e75888491c4fcb330f25b61818ae7397609f/src/headless.js#L71

@Saborknight
Copy link
Member Author

Created our fork of arma-server for this: https://github.com/2bnb/node-arma-server

Saborknight added a commit that referenced this issue Mar 30, 2020
Saborknight added a commit that referenced this issue Mar 30, 2020
What
=================
Fixed: All the functions (start, stop and isAlive) to work properly.

Issue ID: #1
Saborknight added a commit that referenced this issue Mar 30, 2020
What
=================
Added: `status` command for Arma servers to be added to the list of
servers displayed when the command is used, in addition to the image
showing the server banner.
Added: `updatePointers` command to add new arma server instances that
were started from an unknown source, and remove instances that are no
longer active.

Issue ID: #1
Saborknight added a commit that referenced this issue Mar 30, 2020
What
=================
Added: ArmaManager required configs to `config.json.sample`.
Changed: arma-server npm package from the original to our own fork of
the original. We may make a pull request to add in an option for
detached spawning at some point.

Why
=================
We're using our own fork of arma-server because the original doesn't
have a detached option: https://github.com/2bnb/node-arma-server.

Issue ID: #1
@Saborknight
Copy link
Member Author

I'm now changing the implementation from Dahlgren's ArmaManager to use the commandlines that FASTER outputs for use with it's profiles and mods.

Saborknight added a commit that referenced this issue Sep 8, 2020
What
=================
Changed the `arma-manager.js` implementation which wasn't working
properly on the server for some reason, to now use the commandline
exports that we get from FASTER. FASTER manages the server profiles and
mod downloads for us, and whenever we start a server, it adds the
commandline used to start the server to the clipboard.

I've also managed to make the index.js code is completely independent of
the module used. This means, that all functions that are used are able
to be shared amongst these different modules without having to change
the index.js code at all. This means I can treat the modules that are
used to manage game servers as "drivers", which do the implementation
specific logic, and exposes certain functionality under certain
keywords:
- start
- stop

Issue ID: #1
Saborknight added a commit that referenced this issue Sep 8, 2020
What
=================
Improved: the logging and response messages on Discord for the commands
that interact with the driver.
Fixed: `stop()` command not finding the processes by PID before. Also,
the profile specific kill commands now work properly.

Issue ID: #1
@Saborknight Saborknight changed the title Integrate ArmaServer by Dahlgren Integrate ArmaServer module Nov 9, 2020
@Saborknight Saborknight changed the title Integrate ArmaServer module Integrate arma-manager module Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant