19th February 2023, 09:16
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...
18th February 2023, 09:42
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...
17th February 2023, 16:16
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...