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

Add support for offline warns and kicks #46

Merged
merged 1 commit into from
Aug 24, 2023
Merged

Add support for offline warns and kicks #46

merged 1 commit into from
Aug 24, 2023

Conversation

cswhite2000
Copy link
Member

@cswhite2000 cswhite2000 commented Aug 24, 2023

This makes it so that when you warn or kick an offline player it performs the punishment action on the player 5 seconds after they next login.

The punishment reason is prefixed with how long ago the punishment was issued.

warning-test

This is implemented by setting the Warns and Kicks issued while the player is offline to active = true. Then when the player next joins, the server checks for all active warns and kicks. It then subsequently executes these punishments and sets active = false.

I used the active column since it seemed to fit and it meant I didn't need to modify the DB structure.

Copy link
Member

@applenick applenick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic addition! 👍

@applenick applenick merged commit 12820b6 into dev Aug 24, 2023
2 checks passed
@applenick applenick deleted the offline-warns branch August 24, 2023 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants