[x] I am aware that this PR may be closed if the above-mentioned criteria are not fulfilled.
Changes Proposed
Do not use toLower() on player inputs for House, Subowner, and Door invite list, it will break for guilds and/or guild ranks with uppercase letters.
Fix an issue where parseList(...) did not properly parse strings for guild rank (off-by-1 error in substring math)
Additionally, to prevent issues like this in the future, compare guild names and ranks ignoring case.
Issues addressed:
The code in TFS does not ignore case for guild invites, but it does force toLower() on inputs, so any guilds with uppercase letters in the name, or ranks with uppercase letters in the name, will not work via @guildName or guildName@rank invites, subowners, or for door control.
Note that this is okay on some versions, including master, for guild names. Guild names in fact will function on master here, but guild RANKS are still compared by string comparison across the board. However, I think forcing both to be toLower() is much more readable in both scenarios, despite the fact that it is only fixing a bug for the ranks not the guild names.
Pull Request Prelude
Changes Proposed
toLower()
on player inputs for House, Subowner, and Door invite list, it will break for guilds and/or guild ranks with uppercase letters.parseList(...)
did not properly parse strings for guild rank (off-by-1 error in substring math)Issues addressed:
The code in TFS does not ignore case for guild invites, but it does force
toLower()
on inputs, so any guilds with uppercase letters in the name, or ranks with uppercase letters in the name, will not work via@guildName
orguildName@rank
invites, subowners, or for door control.Note that this is okay on some versions, including master, for guild names. Guild names in fact will function on master here, but guild RANKS are still compared by string comparison across the board. However, I think forcing both to be
toLower()
is much more readable in both scenarios, despite the fact that it is only fixing a bug for the ranks not the guild names.example
aleta sio -->
toLower()
for no real reason