Jump to content

Check for file/patch on client's side


Guest mrlocus
 Share

Recommended Posts

Hello, i have been working around on this problem for a few days now - and could not find a solution.

I would like to force the client to have a custom patch installed, and else my realm server wont let him login.

i found this code snippet in AuthSocket.cpp

 char tmp[24];
sprintf(tmp, "./patches/%d%s.mpq", _build, _localizationName.c_str());
FILE *pFile = fopen(tmp, "rb");

if(!pFile)
{ etc..

tried around, but could not get this to work for my needs.

do you have an idea how i could check if the client has a special file in his Data folder? (for ex. my-patch.mpq)

thanks for all responses in advance,

mrlocus

Link to comment
Share on other sites

Hello, i have been working around on this problem for a few days now - and could not find a solution.

I would like to force the client to have a custom patch installed, and else my realm server wont let him login.

i found this code snippet in AuthSocket.cpp

 char tmp[24];
sprintf(tmp, "./patches/%d%s.mpq", _build, _localizationName.c_str());
FILE *pFile = fopen(tmp, "rb");

if(!pFile)
{ etc..

tried around, but could not get this to work for my needs.

do you have an idea how i could check if the client has a special file in his Data folder? (for ex. my-patch.mpq)

thanks for all responses in advance,

mrlocus

That is for patch downloads only so clients can download official patches from the server. You cant use custom patches for it, at least not with the basic code because it checks the MD5 hash of the file.

I see no possibility to check if the client has a specific MPQ, but there might be some hacky ways. I remember that I made a addon check years ago on the WoWEmu and it worked fine, you were able to stay online only when you had addon X else you get kicked.

Link to comment
Share on other sites

I see no possibility to check if the client has a specific MPQ, but there might be some hacky ways. I remember that I made a addon check years ago on the WoWEmu and it worked fine, you were able to stay online only when you had addon X else you get kicked.

thats exactly what i am looking for, you still have some code somewhere on your drive?

but well, maybe also just possible in older game version.

i'll keep you guys up to date if i find something out about this,

if someone else knows a hint, please dont hesitate and post! :)

That is for patch downloads only so clients can download official patches from the server. You cant use custom patches for it, at least not with the basic code because it checks the MD5 hash of the file.

well, i just need to check if a file is there with a special name. i dont care about the file content at all or something, just the file :)

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use