CreateConVar exits, what about DeleteConVar ?
Like the topic says. When I unload a certain plugin, I would like all of its created convars to be removed from the server memory. Is that possible, without restarting the server?
|
Re: CreateConVar exits, what about DeleteConVar ?
This is actually a great question. I imagined closing the ConVar handles would automatically delete the ConVars themselves, however, it doesn't.
|
Re: CreateConVar exits, what about DeleteConVar ?
Someone asked the same question in 2007 and Bailopan said no. If nothing has changed, this probably still stands true to this day. What would it take for the sm-devs to include such a feature in the developer versions of SM?
Another thing I'm trying to figure out. Plugin A creates cvar1 with the FCVAR_NOTIFY flag. Plugin B removes the FCVAR_NOTIFY flag from cvar1. But in HLSW, gametracker, gamemonitor, cvar1 remains with the NOTIFY flag. Why is that? The flag is gone but the FCVAR_NOTIFY is somehow still in server memory. (clearing provider cache in HLSW doesn't work here). |
Re: CreateConVar exits, what about DeleteConVar ?
Why do you need to delete the convar, only one plugin should be creating it. If you want to find it in another plugin use FindConVar()
|
Re: CreateConVar exits, what about DeleteConVar ?
I want to delete them in order to tidy up the A2S_RULES list (the publicly quired server convars).
Lets say I load a plugin that is creating 10 public cvars with FCVAR_NOTIFY. During play, I unload this plugin without restarting the server that day. 1. The ConVars will still be in memory. and 2. They are still going to show up in the A2S_Rules list. These ConVars will be falsely quiered by HLSW, when the plugin is not even loaded on the server anymore. |
Re: CreateConVar exits, what about DeleteConVar ?
I don't think HLSW is also setup to "forget" and recache what it found from the server.
|
Re: CreateConVar exits, what about DeleteConVar ?
Quote:
|
Re: CreateConVar exits, what about DeleteConVar ?
Quote:
|
Re: CreateConVar exits, what about DeleteConVar ?
Quote:
The second half of the above sentence should tell you why DeleteConVar doesn't exist. Quote:
Edit 2 (Edit 1 got baleeted): In the Source 2013 source code, the only command I see for unregistering a ConVar will unregister every convar that a DLL owns. As I mentioned above, SourceMod owns all convars it creates on behalf of a plugin. |
Re: CreateConVar exits, what about DeleteConVar ?
1 Attachment(s)
Quote:
Code:
native bool:SteamWorks_SetRule(const String:sKey[], const String:sValue[]); Here's a test plugin btw of something I'm trying to achieve. I'm adding sv_region to A2S_Rules list, on plugin unload or convar unload, well you know what I want to do. Like you said, it doesn't clear the convar from the A2S list. |
All times are GMT -4. The time now is 03:12. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.