Raised This Month: $51 Target: $400
 12% 

banned_user.cfg not reading bans


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bumblebee0001
Junior Member
Join Date: Jan 2024
Old 01-10-2024 , 02:47   banned_user.cfg not reading bans
Reply With Quote #1

hi all, I recently ran into a problem in my server L4D2 linux. i have some very troll players who join in the server and just suiciding or team kill etc. and so I wanted to ban them but here is the issue.

banning in-game works with the !ban command but the ban only last until the server is restart, then they can join back again. I also used the sm_addban in console and it adds successfully the STEAMID to banned_user.cfg like this format

banid 0 STEAM_ID

however it is not working, I tested banning myself like this and I can still rejoin the server as well as on server restart. the only thing that works is banning ip in banned_ip.cfg but ips can be easily changed and in some countries can be change just by restarting the internet router, so i believe this is an issue with the server unable to read things from STEAM. i also did a fresh install of the server and only added the addons , cfg folder that way I am not modifying any of the steam things before.

this is also added to the bottom of server.cfg
PHP Code:
exec banned_user.cfg
exec banned_ip
.cfg
writeid
writeip
heartbeat 
SourceMod Version: 1.12.0.7054
Metamod:Source version 1.11.0-dev+1148

any help guys?

Last edited by bumblebee0001; 01-10-2024 at 02:49.
bumblebee0001 is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 01-10-2024 , 06:32   Re: banned_user.cfg not reading bans
Reply With Quote #2

open or create autoexec.cfg in cfg folder. Make sure it is cfg and not txt.
Write inside autoexec.cfg file, on top of file:
exec banned_user.cfg
exec banned_ip.cfg


When server start, you can see permament bans from console, using server cmd:
listid

SRCDS only save permament bans in banned_user.cfg

For storing temporary bans, you need use plugin.


List your plugins.
sm plugins list
__________________
Do not Private Message @me
Bacardi is offline
Mystik Spiral
Senior Member
Join Date: Oct 2020
Location: Orlando, FL
Old 01-10-2024 , 18:09   Re: banned_user.cfg not reading bans
Reply With Quote #3

I second what @Barcardi said!

"exec banned_user.cfg" and "exec banned_ip.cfg" load the bans from disk into memory.
"writeid" and "writeip" write the bans in memory to disk.

Since server.cfg is executed on every map change, you are currently loading the bans from disk into memory (overwriting any new bans) before writing bans from memory to disk.

Remove "exec banned_user.cfg" and "exec banned_ip.cfg" from server.cfg and add it to autoexec.cfg. Unlike server.cfg which is executed every map change, autoexec.cfg is only executed when the server is started.

After you make this change, the bans from disk are loaded into memory when the server starts, and new and existing bans in memory are written to disk on every map change.
__________________

Last edited by Mystik Spiral; 01-10-2024 at 18:42.
Mystik Spiral is offline
bumblebee0001
Junior Member
Join Date: Jan 2024
Old 01-11-2024 , 04:52   Re: banned_user.cfg not reading bans
Reply With Quote #4

Hi guys i fixed, i reinstalled sourcemod and metamod completely as I think i had some corrupted files messing up the connection to steam. I also noticed that when I put a steam id into a website like steamio, the steamid comes up as STEAM_0:1xxxxxx or STEAM_1:1xxxxxx etc.. I dont know what is the exact combination of the 1 and 0 but I tested baning myself again and using STEAM_1:1xxxxxx was working when my steam account showed STEAM_1:0xxxxxx on website. maybe this is a bug

Last edited by bumblebee0001; 01-11-2024 at 06:11.
bumblebee0001 is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 01-11-2024 , 07:26   Re: banned_user.cfg not reading bans
Reply With Quote #5

There are no difference between STEAM_1:0: and STEAM_1:1:
those differ on different game engines.

But I'm not sure, if you ban manually by typing alternative steamid rather than what you see under status command,
does it work. I have not tested.
__________________
Do not Private Message @me
Bacardi is offline
JustNO
Member
Join Date: Jul 2020
Old 01-16-2024 , 10:30   Re: banned_user.cfg not reading bans
Reply With Quote #6

Quote:
Originally Posted by bumblebee0001 View Post
Hi guys i fixed, i reinstalled sourcemod and metamod completely as I think i had some corrupted files messing up the connection to steam. I also noticed that when I put a steam id into a website like steamio, the steamid comes up as STEAM_0:1xxxxxx or STEAM_1:1xxxxxx etc.. I dont know what is the exact combination of the 1 and 0 but I tested baning myself again and using STEAM_1:1xxxxxx was working when my steam account showed STEAM_1:0xxxxxx on website. maybe this is a bug
If you put both of them in your ban list, it's fine. Everyone always has two steam IDs in this format, but with 2 different STEAM_*:*: combinations. so out of those 4, someone always has two. For example, for some reason, players who are banned with STEAM_1:0:********** can come back with STEAM_0:0:***********. I don't know why that happens, but I have experienced it regularly in the past. For that reason, I always used to put both Steam IDs belonging to 1 person in my ban list. Since I started using Sourcebans, this is no longer necessary. I think that has to do with the API that retrieves the data from the Valve servers in a different way. There are these combinations.

STEAM_0:0:
STEAM_1:0:
STEAM_1:1:
STEAM_0:1:

Here you can read how that works at Valve. https://developer.valvesoftware.com/wiki/SteamID

Last edited by JustNO; 01-16-2024 at 10:54. Reason: nvmnd
JustNO is offline
bumblebee0001
Junior Member
Join Date: Jan 2024
Old 01-23-2024 , 03:24   Re: banned_user.cfg not reading bans
Reply With Quote #7

Quote:
Originally Posted by Bacardi View Post
There are no difference between STEAM_1:0: and STEAM_1:1:
those differ on different game engines.

But I'm not sure, if you ban manually by typing alternative steamid rather than what you see under status command,
does it work. I have not tested.
tested this today and the same thing happens, it seems there is a difference about STEAM_1:0: and STEAM_1:1:, only one of the ids is working to block someone from joining the server, it's like there is a certain combination for people who are in the game and people just normally on steam if that makes any sense.

basically what JustNO said is the problem but luckily I don't have to ban too many people, it seems that the steam ID in "status" is the one that will work, but sometimes not the one by putting the steam profile into a website and getting that ID.
bumblebee0001 is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 01-23-2024 , 03:46   Re: banned_user.cfg not reading bans
Reply With Quote #8

I remember something, that if you have SourceBans installed on your server, it maybe clear SRCDS permament bans and use own system.
__________________
Do not Private Message @me

Last edited by Bacardi; 01-23-2024 at 03:47. Reason: nvm you not have that problem
Bacardi is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:02.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode