Code Monkey home page Code Monkey logo

Comments (6)

cp-fabian-pittroff avatar cp-fabian-pittroff commented on August 10, 2024

Hey, thanks for the request. I could try to adopt it with my bash scripts. But I don't know how robust the logic is. It reads the service logs to count every join and exit of a user.

I hoped we get some kind of rcon, so I could get the information strait from that and also do server messaging, to alert users of an upcoming restart.

But I will try fiddling around with that and report back.

from enshrouded-server.

opello avatar opello commented on August 10, 2024

Thanks for the image, it's been working quite well for me.

Using python-a2s and a simple python -c 'import a2s; print(len(a2s.players(("ip",port))));' seems to work. I tried in a python container alongside the enshrouded-server container, but I expect the "ip" being "127.0.0.1" would work too, if not SERVER_IP.

from enshrouded-server.

cp-fabian-pittroff avatar cp-fabian-pittroff commented on August 10, 2024

Thanks for the suggestion. I added the python-a2s script to check for connected players locally. I removed the STEAM_* env vars and added a UPDATE_CHECK_PLAYERS env to enable the check or not.

I'll test it a bit further and merge it afterwards.

from enshrouded-server.

cp-fabian-pittroff avatar cp-fabian-pittroff commented on August 10, 2024

@opello If you want you can check this feature with the latest dev or dev-proton image.

from enshrouded-server.

opello avatar opello commented on August 10, 2024

Thanks! I updated and will do a better test later, but it seems to work:

# PYTHONPATH=/home/enshrouded/.local/lib/python3.10/site-packages python3 -c 'import a2s; print(len(a2s.players(("127.0.0.1",15637))));'
0

from enshrouded-server.

cp-fabian-pittroff avatar cp-fabian-pittroff commented on August 10, 2024

Released with version 0.4.0

from enshrouded-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.