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

improvement: enable custom duration and simplify expiration calculation #4834

Merged
merged 5 commits into from
Nov 11, 2024

Conversation

omarcopires
Copy link
Contributor

Pull Request Prelude

Changes Proposed

Allows setting a custom ban duration and simplifies the expiration time calculation.

@omarcopires
Copy link
Contributor Author

The behavior of the /ban and /ipban commands has been modified to allow specifying a custom number of days instead of using the fixed value of 7 days. Additionally, the code's readability has been improved by using string.format for the return messages.

All TalkActions have been centralized into a single file (revscript), making the code easier to maintain, organize, and access.
A new function has also been added to the Game to simplify access to a player's accountId.
Although I have not tested all the changes, I am available to address any issues or make further adjustments if needed.

data/scripts/talkactions/ban.lua Outdated Show resolved Hide resolved
data/scripts/talkactions/ban.lua Outdated Show resolved Hide resolved
@ranisalt
Copy link
Member

Doesn't seem to break anything that wasn't broken already, nice change 👍

@ranisalt ranisalt merged commit 503dc14 into otland:master Nov 11, 2024
6 checks passed
@omarcopires omarcopires deleted the ban-talk branch November 12, 2024 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants