Merge pull request #681 from catornot/bob-pr-fix

I reverted things in #680 accidently when resolving conflicts so this is here to fix it
This commit is contained in:
GeckoEidechse 2024-03-14 10:03:36 +01:00 committed by GitHub
commit edcc691675
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View File

@ -89,10 +89,14 @@ void ServerPresenceManager::CreateConVars()
});
Cvar_ns_server_desc = new ConVar("ns_server_desc", "Default server description", FCVAR_GAMEDLL | FCVAR_REPLICATED, "This server's description", false, 0, false, 0, [](ConVar* cvar, const char* pOldValue, float flOldValue) {
NOTE_UNUSED(cvar);
NOTE_UNUSED(pOldValue);
NOTE_UNUSED(flOldValue);
g_pServerPresence->SetDescription(UnescapeUnicode(g_pServerPresence->Cvar_ns_server_desc->GetString()));
});
Cvar_ns_server_password = new ConVar("ns_server_password", "", FCVAR_GAMEDLL, "This server's password", false, 0, false, 0, [](ConVar* cvar, const char* pOldValue, float flOldValue) {
NOTE_UNUSED(cvar);
NOTE_UNUSED(cvar);
NOTE_UNUSED(pOldValue);
NOTE_UNUSED(flOldValue);

View File

@ -135,9 +135,8 @@ bool, __fastcall, (void* pMsg)) // 48 8B D1 48 8B 49 18 48 8B 01 48 FF 60 10
if (!pVar->IsFlagSet(FCVAR_REPLICATED))
{
spdlog::warn(
"Blocking replication of remote cvar {} from server (server's var has flag REPLICATED, while ours does not)",
entry->name);
return BLOCKED_INFO(
"Invalid flags (" << std::hex << "0x" << pVar->m_ConCommandBase.m_nFlags << "), var is " << entry->name);
// don't block, as non-malicious servers might send bad cvars, and we still want those clients to be able to
// connect