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

[Feature] Formatting of Variables #169

Open
melliiii opened this issue Sep 27, 2023 · 1 comment
Open

[Feature] Formatting of Variables #169

melliiii opened this issue Sep 27, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@melliiii
Copy link

The ability to do operations on your text in the banner would be really cool!

currently we have variables for Online Users (which include Query Users), for Users with a certain role or Query Roles. To be able to maybe subtract the query users and/or users of a certain role (maybe a Jail role) would be quite handy.

also to apply formats to a variable would be cool. for example to always have a number be 3 numbers (001, 010, 100) or to be able to have a certain amount of numbers behind the period (for example: 01.150, 10.400).

an implementation for the textboxes would maybe be something like this:
Online: $(%VIRTUALSERVER_CLIENTSONLINE% - %VIRTUALSERVER_QUERYCLIENTSONLINE%) Users

or in case of the format i would go kinda in the style of javas DecimalFormat class:
Bytes sent: $format(%CONNECTION_BYTES_SENT_KEEPALIVE%, "0.00###") MiB

0 – prints a digit if provided, 0 otherwise
# – prints a digit if provided, nothing otherwise
. – indicate where to put the decimal separator
, – indicate where to put the grouping separator

i know a implementation of such a system would eat a lot of resources and time to get right, but it can be quite useful

@melliiii melliiii added the enhancement New feature or request label Sep 27, 2023
@Sebbo94BY
Copy link
Owner

Thanks for the feature request and the detailed information!

Yeah, this feature (request) is already on the todo list, but it's a complex topic and thus I haven't worked on it yet. But a future version will include such a feature. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants