def set_cvar_once(cls, name, value, flags=0): """Sets a cvar. If the cvar exists, do nothing. :param name: The name of the cvar. :type name: str :param value: The value of the cvar. :type value: Anything with an __str__ method. :param flags: The flags to set if, and only if, the cvar does not exist and has to be created. :type flags: int :returns: True if a new cvar was created, False if an existing cvar was set. :rtype: bool """ return minqlx.set_cvar_once(name, value, flags)
def initialize_cvars() -> None: # Core minqlx.set_cvar_once("qlx_owner", "-1") minqlx.set_cvar_once("qlx_plugins", ", ".join(DEFAULT_PLUGINS)) minqlx.set_cvar_once("qlx_pluginsPath", "minqlx-plugins") minqlx.set_cvar_once("qlx_database", "Redis") minqlx.set_cvar_once("qlx_commandPrefix", "!") minqlx.set_cvar_once("qlx_logs", "2") minqlx.set_cvar_once("qlx_logsSize", str(3 * 10**6)) # 3 MB # Redis minqlx.set_cvar_once("qlx_redisAddress", "127.0.0.1") minqlx.set_cvar_once("qlx_redisDatabase", "0") minqlx.set_cvar_once("qlx_redisUnixSocket", "0") minqlx.set_cvar_once("qlx_redisPassword", "")
def initialize_cvars(): # Core minqlx.set_cvar_once("qlx_owner", "-1") minqlx.set_cvar_once("qlx_plugins", ", ".join(DEFAULT_PLUGINS)) minqlx.set_cvar_once("qlx_pluginsPath", "minqlx-plugins") minqlx.set_cvar_once("qlx_database", "Redis") minqlx.set_cvar_once("qlx_commandPrefix", "!") minqlx.set_cvar_once("qlx_logs", "2") minqlx.set_cvar_once("qlx_logsSize", str(3*10**6)) # 3 MB # Redis minqlx.set_cvar_once("qlx_redisAddress", "127.0.0.1") minqlx.set_cvar_once("qlx_redisDatabase", "0") minqlx.set_cvar_once("qlx_redisUnixSocket", "0") minqlx.set_cvar_once("qlx_redisPassword", "")