Skip to content

Add a new server sorting method, Filtered Connected Drivers#162

Open
isaac-weisberg wants to merge 3 commits into
gro-ove:masterfrom
isaac-weisberg:isaac/filtered-connected-drivers
Open

Add a new server sorting method, Filtered Connected Drivers#162
isaac-weisberg wants to merge 3 commits into
gro-ove:masterfrom
isaac-weisberg:isaac/filtered-connected-drivers

Conversation

@isaac-weisberg
Copy link
Copy Markdown

In the server list of Content Manager, you can already sort servers by Connected Drivers.

However, nowadays there is a problem where server owners have some users be permanently listed as connected on the server, while not actually being connected to them, as a form of reserving a slot for a player. This causes the server to be displayed as if has 5 players on it, it's sorted accordingly, however, if you try to join it, you will find that the server is actually empty.

before

I also believe that the mechanisms involved here are not related in any way to the booking system - these phantom drivers are displayed literally as if they are random players already racing on the server, when they are not.

This limits the usefulness of Connected Drivers sorting because the core intent is to find servers that have players right now that you can race against.

I propose adding a new setting to Online settings of Content Manager, Filtered Connected Drivers and a new sorting mode.

  • In settings, there will be a multiline text box that allows the user to specify a list of patterns, separated by newline.
settings
  • In server list, a new sorting mode is available, Filtered Connected Drivers
new sorting
  • The new sorting mode counts the drivers per server, but it excludes any driver whose name contains any pattern from the list of patterns specified in the settings at Settings -> Content Manager -> Online -> Filtered Connected Drivers.

Example:

  • 3 servers
    • A, with 5 drivers: Steve, Mark, Alice, Nick, Gabe
    • B, with 3 drivers: Reserved Slot, Reserved Slot, Reserved Slot
    • C, with 1 driver: Bob
  • If the sorting mode is Connected Drivers, we will see the order of servers:
    • ABC, 5-3-1 drivers
  • But with this new feature, we can set the value of Settings -> Content Manager -> Online -> Filtered Connected Drivers to
Reserved Slot
VIP
Not Connected
  • And then in Filtered Connected Drivers sorting mode, we will see the order of servers:
    • ACB, 5-1-3
    • Because all of 3drivers in server B have matched to any of the lines of the Settings -> Content Manager -> Online -> Filtered Connected Drivers, effectively causing it to count as having "0 drivers" in the sorting algorithm.
after

The default value for the filtering list is not provided.

Also the solution is a bit inefficient because it recalculates the driver list on every comparator call between 2 server instances, meaning that there is up to an exponential recalculation of filtered driver names in relation to the number of servers to sort. A good way to improve this is to make the filtered list of drivers count be stored on ServerEntry, however, this will mean updating every server entry with the new filter list every time we go back to the server list, I imagine. I can do that too if necessary.

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.

1 participant