bans.txt - How to

Discussion in 'Hosting Help' started by DanRZ, Feb 23, 2023.

  1. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    720
    Likes Received:
    220
    Hello, simple question, how can i fill the file bans.txt ?
    I have some weird name joining my server and don(t want that ... Your Nalme, John Doe, him ...
    Can i ban by StemID ? IP ? Name ?
    And what do i put in the file ?
    Thanks.
     
  2. Goanna

    Goanna Registered

    Joined:
    Jan 19, 2012
    Messages:
    1,407
    Likes Received:
    956
    Probably the quickest way to find what is required is to join your server as a client, then on the server console ban yourself. That should write the required info/format to the bans.txt file to give you some indication of what’s required. Don’t forget to remove your data from the text file when you’re done :D
     
    DanRZ and Corti like this.
  3. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    720
    Likes Received:
    220
    Will probably do that ... Can i ban by SteamID or IP ?
     
  4. Corti

    Corti Registered

    Joined:
    Sep 29, 2014
    Messages:
    1,362
    Likes Received:
    2,517
    we have some register:
    178.174.148.192 42 DanRZ
    178.174.173.198 42 Corti
    31.17.146.76 42 Name

    Always number 42 after IP (But I don't know why maybe someone can explain)
     
    DanRZ likes this.
  5. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    720
    Likes Received:
    220
    Thanks. I would have prefered by Steam ID ...
    Maybe :
    SteamID 41 DanRZ

    42 look like some kind of identification of type.
     
  6. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    720
    Likes Received:
    220
    Hello, i'm still on the subject of bans ...
    I would love someone explain the 42 and the other possibilities.
    And a "white list" would probably be more useful, or some kind of file like allowed.txt instead of bans.txt or bypassing it when existing.
     
  7. "42" is the (default?) value of "unique id" in player.json - but I think it can be changed. I remember "42" being used in custom skin filenames (on server side) after upload, but I maybe wrong.

    If I remember correctly we tried to get custom skin transfer working (beginning of last year it seemed to be broken) by changing unique id and it was possible to change this value.

    If it comes to blocking / banning, I would say it will have an influence, but will make it more complicated to ban people from your server :-/
     
  8. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    720
    Likes Received:
    220
    Custom skin transfer works, i tried it, you just need to check "Allow skin transfer" on server.

    But i read on LFM that they had issues with that and disabled it, so i disabled it.
     
  9. It was a misunderstanding - we tried custom skin and team cars last year (in the beginning I think) and it seems to be broken, at least custom skin transfer (it worked basically but the skins were messed up on the cars).

    Now it is working as expected.

    If you have a look the custom skin files (and also them of team cars) on the server are still preceeded with _42 so I think it is the unique id in player.json which is taken.

    So one of the questions were "what is unique id" and I cannot answer that, but I guess it is taken for custom skins e.g. and other things.
     
    Kahel likes this.

Share This Page