Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Commit

Permalink
Add MP Server check
Browse files Browse the repository at this point in the history
  • Loading branch information
BC46 committed Dec 13, 2023
1 parent e2b33c7 commit 1d51a08
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions def/Common.def
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ EXPORTS
?get_value_float@INI_Reader@@QAEMI@Z
?get_value_string@INI_Reader@@QAEPBDI@Z
?close@INI_Reader@@QAEXXZ
?IsMPServer@@YA_NXZ
2 changes: 2 additions & 0 deletions include/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ class Import INI_Reader
private:
BYTE data[0x1565];
};

bool Import IsMPServer();
10 changes: 6 additions & 4 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,18 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved)
UNREFERENCED_PARAMETER(lpReserved);

// TODO: Support FLServer
// TODO: Hook Server.dll load on client
// IsMPServer common.dll might be useful
// Call set value functions common.dll
// Split up into multiple files
// Define hard coded addresses
if (fdwReason == DLL_PROCESS_ATTACH)
{
Init();

DWORD loadLibraryAddrFl = 0x5B6F48;
SetLoadLibraryAHook(loadLibraryAddrFl);
if (!IsMPServer())
{
DWORD loadLibraryAddrFl = 0x5B6F48;
SetLoadLibraryAHook(loadLibraryAddrFl);
}
}

return TRUE;
Expand Down

0 comments on commit 1d51a08

Please sign in to comment.