Arkshine ClientConnect is gamedll function, if it returns false (but fakemeta change "true" to "false") engine will reject client with szRejectReason (it isn't const string):
fakemeta code:
PHP Code:
#define SIMPLE_BOOL_HOOK_EDICT_CONSTSTRING_CONSTSTRING_STRING128(call) \
qboolean call (edict_t *e, const char *sza, const char *szb, char blah[128]) \
{ \
FM_ENG_HANDLE(FM_##call, (Engine[FM_##call].at(i), (cell)ENTINDEX(e), sza, szb, blah)); \
RETURN_META_VALUE(mswi(lastFmRes),(int)mlCellResult > 0 ? 0 : 1); \
} \
engine decompiled code:
PHP Code:
snprintf(*(char **)arg, 0x80u, "Connection rejected by game\n", v22);
v18 = *(_DWORD *)arg;
v17 = v25;
v16 = s;
v15 = (int)v26;
if ( (gEntityInterface.pfnClientConnect)(
v26,
s,
v25,
*(_DWORD *)arg) )
{
MSG_WriteByte(&a1, 9);
v7 = Info_Serverinfo();
v14 = v7;
v8 = va("fullserverinfo \"%s\"\n", v7);
MSG_WriteString(&a1, v8);
v9 = svs.m_pClients;
for ( i = 0; i < svs.m_iMaxClients; ++v9 )
{
if ( v9 == host_client || v9->m_fActive || v9->m_fConnected || v9->m_fSpawned )
SV_FullClientUpdate(v9, (int)&a1);
++i;
}
Netchan_CreateFragments(1, &host_client->m_netchan, &a1);
Netchan_FragSend(&host_client->m_netchan);
}
else
{
MSG_WriteByte(&host_client->m_netchan.msg, 9);
v14 = *(_DWORD *)arg;
v6 = va("echo %s\n", *(_DWORD *)arg);
MSG_WriteString(&host_client->m_netchan.msg, v6);
v22 = *(char **)arg;
SV_DropClient(host_client, 0, "Server refused connection because: %s", *(_DWORD *)arg);
}
__________________