Merge pull request #679 from diamante0018/fix/loggert

[Logger]: Fix pipe, bruh moment
This commit is contained in:
Edo 2022-12-28 13:48:05 +01:00 committed by GitHub
commit a9fdf2eeea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View File

@ -7,7 +7,7 @@ namespace Components
std::vector<std::string> Logger::MessageQueue;
std::vector<Network::Address> Logger::LoggingAddresses[2];
std::function<void(const std::string&)> Logger::PipeCallback;
void(*Logger::PipeCallback)(const std::string&) = nullptr;;
bool Logger::IsConsoleReady()
{
@ -125,7 +125,7 @@ namespace Components
}
}
void Logger::PipeOutput(const std::function<void(const std::string&)>& callback)
void Logger::PipeOutput(void(*callback)(const std::string&))
{
PipeCallback = callback;
}

View File

@ -12,7 +12,7 @@ namespace Components
static void Print_Stub(int channel, const char* message, ...);
static void PipeOutput(const std::function<void(const std::string&)>& callback);
static void PipeOutput(void(*callback)(const std::string&));
static void PrintInternal(Game::conChannel_t channel, const std::string_view& fmt, std::format_args&& args);
static void ErrorInternal(Game::errorParm_t error, const std::string_view& fmt, std::format_args&& args);
@ -112,7 +112,7 @@ namespace Components
static std::vector<std::string> MessageQueue;
static std::vector<Network::Address> LoggingAddresses[2];
static std::function<void(const std::string&)> PipeCallback;
static void(*PipeCallback)(const std::string&);
static void MessagePrint(int channel, const std::string& msg);

View File

@ -76,7 +76,7 @@ namespace Components
bool RCon::RateLimitCheck(const Network::Address& address, const int time)
{
auto ip = address.getIP();
const auto ip = address.getIP();
if (!RateLimit.contains(ip.full))
{

View File

@ -6443,7 +6443,7 @@ namespace Game
typedef union
{
unsigned char bytes[4];
DWORD full;
std::uint32_t full;
} netIP_t;
struct netadr_t