[Logger]: Fix pipe, bruh moment

This commit is contained in:
Diavolo 2022-12-28 13:37:03 +01:00
parent abaa8eeaef
commit 72677d4b1b
No known key found for this signature in database
GPG Key ID: FA77F074E98D98A5
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