I'd say load the cvar on server load (don't update it runtime), let some c-code extract the stuff, store it in the 4 bytes of netadr_t and compare that run-time (4 byte compare for every getstatus...
I'd say load the cvar on server load (don't update it runtime), let some c-code extract the stuff, store it in the 4 bytes of netadr_t and compare that run-time (4 byte compare for every getstatus...
You can take a look at https://github.com/M-itch/libcod/blob/e58d6a01b11c911fbf886659b6ea67795776cf4a/libcod.cpp#L52
Mostly self-explaining, you get a reference to the cvar and can just compare...
I wouldn't overcomplicate it, something like:
#include "stdio.h"
#include "string.h"
int main() {
char *ips = "127.0.0.1 234.44.23.52 1.2.3.4";
char *test1 = "1.2.3.4";
char...
The segfault message points to this function:
BOOL __cdecl BG_IsWeaponValid(int a1, int a2)
{
bool v2; // bl
bool v3; // cl
int v4; // eax
BOOL result; // eax