SQL filter for banned players

antigodeantigode
edited September 2 in Native
Hello,
how should be my sql filter when i want to join a random room where i'm not banned ?
In the custom properties there is a key: "Bn" which contains a string array with the userId's banned players.
i've tried but i really don't see how to make it work. (and if sql filter allows it)

Thank you

EDIT: i've set this to test: 'blue' IN ('blue', 'red') but it returns me false !!

Comments

  • JohnTubeJohnTube mod
    edited September 2
    Hi @antigode,

    First, I would not let banned users authenticate using custom authentication.
    Second, I would use a custom external matchmaker.

    If you still want to use SQL Lobby Matchmaking:

    Use one of the C0 to C9 reserved custom room properties visible to the lobby to save the banned users' list as a string. Use a char for delimiter/separator.

    Example:

    delimiter is ','
    key used is C0
    3 banned users
    C0 = "bannderUserId,banndedUserId1,bannedUserId2".
    Create rooms with initialized banned users list.
    You can update C0 later to add or remove banned users.

    Matchmaking filter:

    "C0 NOT LIKE '%{userId}%'"

    replace {userId} with your own userId.
    this makes use of regex pattern matchmaking.

    EDIT: my colleague @Kaiserludi helped understand this better. you are not talking about globally banned users but the list of users a player does not want to player with/against.
Sign In or Register to comment.