bool CALLBACK outcomingData(stRakNetHookParams *params)
{
if (params->packetId == RPCEnumeration::RPC_ClientJoin)
{
BitStream *bs = params->bitStream;
int iVersion;
byte byteMod;
byte byteNameLen;
char szNickName[32];
uint uiChallengeResponse;
byte byteAuthBSLen;
char pszAuthBullshit[size];
byte clientVersionLen;
char clientVersion[size];
params->bitStream->ResetReadPointer();
params->bitStream->Read(iVersion);
params->bitStream->Read(byteMod);
params->bitStream->Read(byteNameLen);
params->bitStream->Read(szNickName, byteNameLen);
szNickName[byteNameLen] = '\0';
params->bitStream->Read(uiChallengeResponse);
params->bitStream->Read(byteAuthBSLen);
params->bitStream->Read(pszAuthBullshit, byteAuthBSLen);
pszAuthBullshit[byteAuthBSLen] = '\0';
params->bitStream->Read(clientVersionLen);
params->bitStream->Read(clientVersion, clientVersionLen);
clientVersion[clientVersionLen] = '\0';
iVersion = version;
sprintf(pszAuthBullshit, "authkey");
byteAuthBSLen = sizeof(pszAuthBullshit);
sprintf(clientVersion, "client version");
clientVersionLen = sizeof(clientVersion);
params->bitStream->ResetWritePointer();
params->bitStream->Write(iVersion);
params->bitStream->Write(byteMod);
params->bitStream->Write(byteNameLen);
params->bitStream->Write(szNickName, byteNameLen);
params->bitStream->Write(uiChallengeResponse);
params->bitStream->Write(byteAuthBSLen);
params->bitStream->Write(pszAuthBullshit, byteAuthBSLen);
params->bitStream->Write(clientVersionLen);
params->bitStream->Write(clientVersion, clientVersionLen);
};
return true;
}