[Logger]: Fix pipe, bruh moment
This commit is contained in:
parent
abaa8eeaef
commit
72677d4b1b
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -6443,7 +6443,7 @@ namespace Game
|
||||
typedef union
|
||||
{
|
||||
unsigned char bytes[4];
|
||||
DWORD full;
|
||||
std::uint32_t full;
|
||||
} netIP_t;
|
||||
|
||||
struct netadr_t
|
||||
|
Loading…
Reference in New Issue
Block a user