citizenfx / fivem

The source code for the Cfx.re modification frameworks, such as FiveM, RedM and LibertyM, as well as FXServer.
https://cfx.re/
3.5k stars 2.07k forks source link

serverlist filter bug #2379

Open onlyzaxd opened 7 months ago

onlyzaxd commented 7 months ago

What happened?

Hi

Since we are a braindead country and our general iq is under 10

When you search in game by the word "romania" it doesn't show up any server you have to actually type "romani" and since people are under the average iq everyone is searching for romania instead of romani

I see this little problem only in game server list since the browser version works fine

Expected result

-

Reproduction steps

Everything already explained above

Importancy

Slight inconvenience

Area(s)

FiveM

Specific version(s)

All

Additional information

No response

glitchdetector commented 7 months ago

Searching "romania" does indeed hide listings with the word "romania" in it. image image

It also appears to happen with most country names.

blattersturm commented 7 months ago

I believe this was meant to be an alias for country filters but for some reason this just shows nothing instead?

onlyzaxd commented 7 months ago

I believe this was meant to be an alias for country filters but for some reason this just shows nothing instead?

Yea nothing is shown so far and it looks to be on more countries i was thinking it was something specific with romania word

nihonium-cfx commented 7 months ago

It looks like the culprit here is that we're adding dashes if think that search term matches country name: https://github.com/citizenfx/fivem/blob/master/ext/cfx-ui/src/cfx/base/searchTermsParser.ts#L126-L136

But server's locale is just ro so of course this doesn't really match -ro in this case.

blattersturm commented 7 months ago

Country names and language names are different as well, I guess -RO is meant to match a suffix.

On Wed, Feb 7, 2024 at 12:41 Nihonium @.***> wrote:

It looks like the culprit here is that we're adding dashes if think that search term matches country name: https://github.com/citizenfx/fivem/blob/master/ext/cfx-ui/src/cfx/base/searchTermsParser.ts#L126-L136

But server's locale is just ro so of course this doesn't really match -ro in this case.

— Reply to this email directly, view it on GitHub https://github.com/citizenfx/fivem/issues/2379#issuecomment-1931865091, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF3QBAQWEQFO22MOVH5WLIDYSNR6NAVCNFSM6AAAAABC5TLRIWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZRHA3DKMBZGE . You are receiving this because you commented.Message ID: @.***>

CritteRo commented 7 months ago

Assuming the user is always looking for the server's country-of-origin when typing a country name in search bar might be too unintuitive anyway. We already have 3 ways to filter servers by country (country code search, like "en", locale:en-US term search, and Filter by Country in the UI).

A turkish server, with the language code of "tr-TR" because their playerbase is turkish, but with the server name of "ITALY ROLEPLAY" will never be found by the title search, because the search system assumes the server is in Italy, and marked as italian.

blattersturm commented 7 months ago

I believe this was done to fix some sort of keyword spam involving country names that happened in the past.

onlyzaxd commented 7 months ago

Well yeah we have filter options but since players iq is under minimal level

They are still using the old fashion way

Anyway i just wanted to report it in first place since i taught it was just a specific issue with "romania" not every country