Informations
Jump to content

Lorem Ipsum...

Click to Dismiss this Notification
Ładowanie danych...

Recommended Posts

Hello everyone! I'm new to this community, and I've been exploring and learning as much as I can. While my knowledge is still quite basic, I wanted to share a little tip that might be helpful. I noticed many of you might already be familiar with this, but it took me some time to find the right information on the forum until I stumbled upon a thread by @Mali.

P.S.: If anyone has a more efficient way to handle the if statement, I'm all ears, as I'm still getting accustomed to the files.

Let's Dive In

  1. Access the serverinfo.py File:
    Start by navigating to your serverinfo.py file located in the root directory. Check out the STATE_DICT, which should look something like this:

     
  • This is the hidden content, please

    In my example, I want the server to display as green only when it’s Online, and all other statuses should appear red. Feel free to adjust it to suit your preferences!

  • Modify the intrologin.py File:
    Now, move on to the intrologin.py file. Look for the following line:

     
  • This is the hidden content, please

     

  • Update the Code:
    Change that line to the following:

     
  1. This is the hidden content, please

    Note: Ensure that your desired status matches the one defined in your serverinfo.py file, and be sure to replace "ONLINE" with whatever status you are using.

Preview:

Server Status Color Example

As I mentioned earlier, if you have a more dynamic solution, please share! I’m here to learn from all of you!

Link to comment
Share on other sites


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

spacer.png

Disable AdBlock
The popup will be closed in 5 seconds...