Skip to content

Conversation

@DarthTealc
Copy link
Contributor

Checks that sv_location actually matches one of Gmod's flags. If the sv_location doesn't actually match a flag, it'll ignore the sv_location and continue on to name extraction just like any server that hasn't set a sv_location.

Ignore any sv_locations that don't match one of Gmod's flags.
@robotboy655
Copy link
Collaborator

What is this meant to achieve?

@DarthTealc
Copy link
Contributor Author

Allows showing flag from name
Example server: sv_location = "uk", server name = "[UK] Sandbox Server"
In current game: image
In PR: image

Prevents multiple error flags
Example server: sv_location = "abc", server name has nothing extractable
In current game: Receives a unique "?" flag in the filter list and the server list. Is not combined with other invalid values.
In PR: Receives no flag, same as servers with no location set
Example of current game with 3 unique error flags:
image

Needed for other PRs
Required for part of #2333, which this PR was split from

Servers without a flag are now filterable the same as any other flag, by being grouped into an "Unknown" country. That flag is always at the end of the flag filter list. This allows you to include or exclude them, the same as all other countries. On the server list itself, they continue to have no flag.

Prevents bypassing this #2367

Servers without a flag are given a higher score. This is to encourage servers to set their sv_location or put it in the server name for automated extraction (eg "[US]"). Either method results in a flag and is therefore not given a higher score.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement The pull request enhances current functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants