From e51993ed390bcc546c93c299cfcf1609305b3513 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Fri, 4 Mar 2016 20:14:51 +0100 Subject: [PATCH] Fix rcon stuff --- src/Components/Modules/RCon.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Components/Modules/RCon.cpp b/src/Components/Modules/RCon.cpp index d0522a6c..9fb4f96d 100644 --- a/src/Components/Modules/RCon.cpp +++ b/src/Components/Modules/RCon.cpp @@ -51,6 +51,13 @@ namespace Components std::string password = data.substr(0, pos); std::string command = data.substr(pos + 1); + // B3 sends the password inside quotes :S + if (!password.empty() && password[0] == '"' && password[password.size() - 1] == '"') + { + password.pop_back(); + password.erase(password.begin()); + } + std::string svPassword = Dvar::Var("rcon_password").Get(); if (svPassword.empty())