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

[L4D2] Only allow certain addons?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dustinandband
Senior Member
Join Date: May 2015
Old 10-17-2017 , 19:42   [L4D2] Only allow certain addons?
Reply With Quote #1

Instead of disallowing all addons by setting sv_pure in server.cfg - is there a way to only allow a limited amount of specific addons? For example, certain vocalized radial menus would be allowed but custom skins / silenced weapons mods would be disallowed.

I'm wondering if it's possible for a server-side plugin to do this.
dustinandband is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 10-17-2017 , 20:20   Re: [L4D2] Only allow certain addons?
Reply With Quote #2

whitelist.cfg ? open it
__________________
Do not Private Message @me
Bacardi is offline
midnight9
Senior Member
Join Date: Nov 2012
Old 10-18-2017 , 01:31   Re: [L4D2] Only allow certain addons?
Reply With Quote #3

Last time i've checked sv_pure wasnt blocking addons at all.
midnight9 is offline
dustinandband
Senior Member
Join Date: May 2015
Old 10-18-2017 , 11:16   Re: [L4D2] Only allow certain addons?
Reply With Quote #4

Yeah just tested sv_pure 2 and I was still able to use a silenced weapons addons from steam workshop.
I even loaded a new map and typed "sv_pure" in console and it told me the server was using sv_pure 2.

This is what I tried:
in server.cfg (and autoexec.cfg later):
sv_pure "2"

whitelist.cfg (in the main L4D2 directory before the addons / cfg folders):
https://pastebin.com/Q5FYXnRa
(pulled from a promod server I loaded into, seemed detailed enough + the promod server successfully blocks addons).

----------------

Also, not sure where to find the pure_server_whitelist.txt (for editing sv_pure "1" allowed files). Apparently it's in the hl2 directory by default but I searched the entire L4D2 folder and nothing came up:
PHP Code:
root@seattlejuly28:~# grep -rl "pure_server_whitelist" /home/dustin/Steam/SteamFolder/L4D2_server2
/home/dustin/Steam/SteamFolder/L4D2_server2/bin/engine.so
/home/dustin/Steam/SteamFolder/L4D2_server2/bin/engine_srv.so
root
@seattlejuly28:~

Last edited by dustinandband; 10-18-2017 at 11:17.
dustinandband is offline
midnight9
Senior Member
Join Date: Nov 2012
Old 10-18-2017 , 11:58   Re: [L4D2] Only allow certain addons?
Reply With Quote #5

Quote:
Originally Posted by dustinandband View Post
Yeah just tested sv_pure 2 and I was still able to use a silenced weapons addons from steam workshop.
I even loaded a new map and typed "sv_pure" in console and it told me the server was using sv_pure 2.

This is what I tried:
in server.cfg (and autoexec.cfg later):
sv_pure "2"

whitelist.cfg (in the main L4D2 directory before the addons / cfg folders):
https://pastebin.com/Q5FYXnRa
(pulled from a promod server I loaded into, seemed detailed enough + the promod server successfully blocks addons).

----------------

Also, not sure where to find the pure_server_whitelist.txt (for editing sv_pure "1" allowed files). Apparently it's in the hl2 directory by default but I searched the entire L4D2 folder and nothing came up:
PHP Code:
root@seattlejuly28:~# grep -rl "pure_server_whitelist" /home/dustin/Steam/SteamFolder/L4D2_server2
/home/dustin/Steam/SteamFolder/L4D2_server2/bin/engine.so
/home/dustin/Steam/SteamFolder/L4D2_server2/bin/engine_srv.so
root
@seattlejuly28:~

As far as i know you have 2 options to block addons. First is to edit addonconfig.cfg located in cfg folder and simply disable completely addons for desired game mode.

Another is to use Left4Downtown 0.5.7 or newer that allows you to disable addons but also provides an option for exceptions:
Code:
  /**
 * @brief Called when UpdateAddonEclipseContentCvar(char, char) is available for invocation(clientside)
 * @remarks Doesn't fire if l4d2_addons_eclipse equals 0.
 *
 * @param client the client the cvar is being set for
 *
 * @return Pl_Handled to let the client through with addons, Pl_Continue otherwise.
 */
forward Action:L4D2_OnAddonsEclipseUpdate(client);
But i think what this does it simply allows you to enable addons for desired client. But maybe there are other ways that this could be of use to you. I dont know.
midnight9 is offline
dustinandband
Senior Member
Join Date: May 2015
Old 10-25-2017 , 14:28   Re: [L4D2] Only allow certain addons?
Reply With Quote #6

Is it possible addonconfig.cfg can be changed while the server’s running, then the map be reloaded? Maybe a plugin could be responsible for executing this?

I’ve owned some L4D2 promod servers (someone else’s config - which was private) which asked if you wanted to enable addons after you chose a config. I can hire a dev to make it but was wondering how this would work exactly (would it simply change the value in addonconfig.cfg? Then reload the map?)
dustinandband is offline
larrybrains
Senior Member
Join Date: May 2017
Old 12-18-2019 , 21:06   Re: [L4D2] Only allow certain addons?
Reply With Quote #7

I am going to revive this post.

Right now it seems like all we can do with workshop addons is:
  • Disable all addons except for campaigns and certain players (using left4downtown)
  • Enable all addons

Is there no way to disable all addons except for certain whitelisted addons? If this isn't currently an option, would someone be willing to try to make it possible or would it even be possible?

Last edited by larrybrains; 12-18-2019 at 21:07.
larrybrains is offline
JLmelenchon
Senior Member
Join Date: Mar 2019
Old 12-27-2019 , 09:39   Re: [L4D2] Only allow certain addons?
Reply With Quote #8

I'm interested in that too.
JLmelenchon is offline
larrybrains
Senior Member
Join Date: May 2017
Old 12-27-2019 , 14:13   Re: [L4D2] Only allow certain addons?
Reply With Quote #9

Quote:
Originally Posted by JLmelenchon View Post
I'm interested in that too.
I tried to figure out how to only allow certain addons and couldn't get it working. It would only either show ALL of my addons or none.

In server.cfg I set sv_pure to 1 and in addonconfig.cfg I set default and versus to 0.

And then in whitelist.cfg I tried adding just the vpk file name like:

PHP Code:
whitelist
{
    
left4dead2\pak01_dir.vpk        check_crc
    left4dead2
\steam.inf            check_crc

    left4dead2_dlc1
\pak01_dir.vpk        check_crc
    left4dead2_dlc2
\pak01_dir.vpk        check_crc
    left4dead2_dlc3
\pak01_dir.vpk        check_crc

    update
\pak01_dir.vpk            check_crc

    
//workshop addons
    
left4dead2\addons\workshop\205573853.vpk            check_crc

I also tried adding the individual files from the vpk on each line in whitelist.cfg and that didn't work either.

Does anyone know if this is possible and if so what am I missing?
larrybrains is offline
JLmelenchon
Senior Member
Join Date: Mar 2019
Old 01-01-2020 , 22:08   Re: [L4D2] Only allow certain addons?
Reply With Quote #10

It is not possible with the current whitelist it does not allow that. Someone has to make a plugin who could read inside VPK of clients, but that could be impossible eventually.

Last edited by JLmelenchon; 01-01-2020 at 22:08.
JLmelenchon is offline
Reply


Thread Tools
Display Modes

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 21:50.


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