Add cooldown on how often towns & nations can request a merge with the same target#8134
Merged
LlmDl merged 2 commits intoTownyAdvanced:masterfrom Mar 9, 2026
Conversation
LlmDl
requested changes
Mar 8, 2026
Member
LlmDl
left a comment
There was a problem hiding this comment.
Looks good but the defaults should be greater than 0, I'd say 60 is good. The command classes should also only check and add cooldowns if the cooldowns are greater than 0.
LlmDl
approved these changes
Mar 9, 2026
LlmDl
added a commit
that referenced
this pull request
Mar 9, 2026
courtesy of GoodrichDev with PR #8119. - When delete_old_residents.enable, only_remove_town, and only_remove_claim_count are all true (and delete_only_townless is false), residents who are offline longer than deleted_after_time no longer count toward ratio-based max town blocks. - Resident data is kept: purge skips removing town/deleting residents in this mode. - New Config Option: resident_settings.delete_old_residents.only_remove_claim_count - Default: false - When true (and only_remove_town is true) residents are kept and only stop counting toward town claim limits after deleted_after_time. - Add /ta resident set for lastonline/registered with timestamp validation, courtesy of GoodrichDev with PR #8120. - New Command: /ta resident <resident> set registered <timestamp> - Sets the resident registered time with the timestamp being a long. - New Command: /ta resident <resident> set lastonline <timestamp> - Sets the resident lastonline time with the timestamp being a long. - Bump org.bstats:bstats-bukkit from 3.1.0 to 3.2.1. - Add option to consider nation enemies as town outlaws, courtesy of Captain-S0L0 with PR #8132. (First-Time Contributor!) - New Config Option: global_town_settings.consider_enemies_outlaws - Default: false - If set to true, when a town is in a nation any player in another nation that the town's nation considers enemies will be considered an outlaw in that town. - Improve NameValidation checks for banned names, courtesy of Veyronity with PR #8133. - Prevents Towns and Nations being named with subcommands of /town and /nation. - Replaced hard coded list with auto-populating list, which now also includes TownyCommandAddonAPI subcommands. - Add cooldown on how often towns & nations can request a merge with the same target, courtesy of Veyronity with PR #8134. - New Config Option: global_town_settings.merge_request_cooldown_time - Default: 60 - Number of seconds that must pass before a town can send a merge request to the same target. - New Config Option: global_nation_settings.merge_request_cooldown_time - Default: 60 - Number of seconds that must pass before a nation can send a merge request to the same target.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Add configurable cooldown to prevent nations & towns spamming merge requests to the same target entity
New Nodes/Commands/ConfigOptions:
Config:
global_town_settings.merge_request_cooldown_timeglobal_nation_settings.merge_request_cooldown_timeBy making this pull request, I represent that I have the right to waive copyright and related rights to my contribution, and agree that all copyright and related rights in my contributions are waived, and I acknowledge that the TownyAdvanced organization has the copyright to use and modify my contribution under the Towny License for perpetuity.