Team-Silver-Sphere / SquadJS

Squad Server Script Framework
Boost Software License 1.0
164 stars 123 forks source link

Add support for FTP on admin-lists.js #331

Open CodeRedDev opened 9 months ago

CodeRedDev commented 9 months ago

Closes #330

This adds support for fetching adminlists via FTP.

This can be done by adding a source like the following to adminLists in config.json:

"adminLists": [
  {
    "type": "ftp",
    "ftp": {
        "host": "XXX.XX.XXX.XX",
        "port": 12345,
        "user": "username",
        "password": "p@ssw0rd"
    },
    "source": "/SquadGame/ServerConfig/Admins.cfg"
  }
]
CodeRedDev commented 9 months ago

As I am pretty new to Node JS and more professional JS projects I'm pretty sure some part of code does not follow best practices. Please give me some advice if you find some bad code here :)

Apart from code this seems to work pretty fine on my own Squad server.

CodeRedDev commented 9 months ago

Just realized that to complete this issue I would have to add the info above to the ReadMe.

Would appreciate to first have a code review before adding info to ReadMe that doesn't fit the final solution.