From dd5571601f693029c06457e867a34411a1b65a70 Mon Sep 17 00:00:00 2001 From: ASpoonPlaysGames <66967891+ASpoonPlaysGames@users.noreply.github.com> Date: Mon, 4 Sep 2023 18:10:16 +0100 Subject: [PATCH] allow the local player through the banlist --- NorthstarDLL/server/auth/bansystem.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/NorthstarDLL/server/auth/bansystem.cpp b/NorthstarDLL/server/auth/bansystem.cpp index 845a1bff1..9b9d24c43 100644 --- a/NorthstarDLL/server/auth/bansystem.cpp +++ b/NorthstarDLL/server/auth/bansystem.cpp @@ -3,6 +3,7 @@ #include "core/convar/concommand.h" #include "server/r2server.h" #include "engine/r2engine.h" +#include "client/r2client.h" #include "config/profile.h" #include @@ -172,6 +173,10 @@ void ServerBanSystem::UnbanUID(uint64_t uid) bool ServerBanSystem::IsUIDAllowed(uint64_t uid) { + uint64_t localPlayerUserID = strtoull(R2::g_pLocalPlayerUserID, nullptr, 10); + if (localPlayerUserID == uid) + return true; + ReloadBanlist(); // Reload to have up to date list on join return std::find(m_vBannedUids.begin(), m_vBannedUids.end(), uid) == m_vBannedUids.end(); }