-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New config.yml option: afk-timeout-command:
#6169
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
base: 2.x
Are you sure you want to change the base?
Conversation
Co-authored-by: Jason <[email protected]>
Co-authored-by: Jason <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have a few issues with this, would also like @mdcfe's input on this
# | ||
# Available placeholders: | ||
# {USERNAME} - The player's username. | ||
# {KICKTIME} - The time, in minutes, the player has been AFK for. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason we need this variable, wouldn't the time the player has been afk always be the same (the auto-afk-kick above).
@@ -484,6 +484,14 @@ auto-afk: 300 | |||
# Set to -1 for no timeout. | |||
auto-afk-kick: -1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we rename this option to auto-afk-timeout
and explain that it will run the command below if set, otherwise kick the player?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have a few issues with this, would also like @mdcfe's input on this
I added it because this is what I got after doing
Fair enough. I wasn't familiar with the EssentialsX codebase and thought that that was needed if I wanted to parse placeholders in the config option. I can change that line to not use FormatUtil.
The variable is there so that if a server owner changes the AFK timeout, they don't also have to change the
@JRoy |
I believe this could be a list of commands and instead of none, check if the list is empty, just like other settings already do |
Co-authored-by: Josh Roy <[email protected]>
You can deselect items that you don't want to commit 😉
Josh was referring to the older config option
This is something that the team seems to agree with as well, although it's still being debated |
I know that. But isn't the point of .gitignore to ignore files that will never be comitted? Unless this repo does require files in bin/ directories being pushed.
Ahh he was suggesting changing the existing config option name. Fair enough. I'm impartial to that.
I can implement this if you want. I don't necessarily care about that functionality, but it won't interfere with my own functionality, plus I just want this feature implemented so I can use it in my server as soon as I can. |
@SrBedrock @JasonHorkles @JRoy
Now the config.yml looks like this... # Define a set of commands the server runs when a player's AFK time elapses.
# Set to [] to use Essentials' default AFK timeout kick behavior.
#
# Available placeholders:
# {USERNAME} - The player's username.
# {KICKTIME} - The time, in minutes, the player has been AFK for.
afk-timeout-commands: [] and you can set commands like this afk-timeout-commands:
- "msg {USERNAME} You have been AFK for {KICKTIME}. Jailing you and moving you to AFK server..."
- "jail {USERNAME} jail-1"
- "server afk {USERNAME}" |
Implements this #2864
Specifically, this functionality:
afk-timeout-command: "server afk {USERNAME}"
Sends the player to the AFK server on the server-network.
afk-timeout-command: "litebans:kick {USERNAME} You were kicked after {KICK_TIME} minutes of inactivity."
Kicks the player using litebans so that it shows up in their litebans history.
afk-timeout-command: "none"
Default behaviour of essentials kicking the player on afk-timeout.