Since a while libcod just returns accept when sv_cracked is 1. (i am hooking the call where it reads the state)
PHP Code:
set sv_cracked "1"
PHP Code:
char * hook_AuthorizeState( int arg )
{
char * s = Cmd_Argv(arg);
if ((CvarVariableValue == NULL || CvarVariableValue("sv_cracked") == 1) && strcmp (s, "deny") == 0)
return "accept";
return s;
}
#if COD_VERSION == COD2_1_0 || COD_VERSION == COD2_1_2 || COD_VERSION == COD2_1_3
cracking_hook_call(hook_AuthorizeState_call, (int)hook_AuthorizeState);
#endif
This is the safest and best way.