View Single Post
psychonic

BAFFLED
Join Date: May 2008
Old 04-09-2018 , 18:15   Re: CreateConVar exits, what about DeleteConVar ?
Reply With Quote #8

Quote:
Originally Posted by Visual77 View Post
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.
The A2S_Rules responses are provided by the steamclient bin. It has its own caching, and do not provide a way to clear a value, only a way to add/set a value and to clear all values. While workarounds could be made in SM (clearing all and re-adding all current NOTIFY values when the flag is cleared from one), SM doesn't interact directly with the Steamworks interfaces. You could probably do your own workaround using the Steamworks extension posted in the Extensions forum section. Look for AddKeyValue and ClearKeyValues.
psychonic is offline