Skip to content

Commit

Permalink
Updated client loader helper
Browse files Browse the repository at this point in the history
  • Loading branch information
ccw808 committed May 26, 2017
1 parent bcf4162 commit 0ff8b3e
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions Client/loader/Utils.cpp
Expand Up @@ -1989,31 +1989,27 @@ void BsodDetectionOnGameEnd( void )
// Message to advise against running certain other programs
//
//////////////////////////////////////////////////////////
void ForbodenProgramsMessage ( void )
void ForbodenProgramsMessage(void)
{
std::vector < SString > forbodenList;
forbodenList.push_back( "ProcessHacker" );
forbodenList.push_back( "CheatEngine" );

SString strResult;
for ( auto processId : MyEnumProcesses( true ) )
std::vector<SString> forbodenList = {"ProcessHacker", "CheatEngine", "PCHunter"};
std::vector<SString> foundList;
for (auto processId : MyEnumProcesses(true))
{
SString strPathFilename = GetProcessPathFilename ( processId );
SString strFilename = ExtractFilename( strPathFilename );
for ( auto forbodenName : forbodenList )
SString strFilename = ExtractFilename(GetProcessPathFilename(processId));
for (const auto& forbodenName : forbodenList)
{
if ( strFilename.Replace( " ", "" ).BeginsWithI( forbodenName ) )
strResult += strFilename + "\n";
if (strFilename.Replace(" ", "").BeginsWithI(forbodenName) )
foundList.push_back(strFilename);
}
}

if ( !strResult.empty() )
if (!foundList.empty())
{
SString strMessage = _("Please terminate the following programs before continuing:");
strMessage += "\n\n";
strMessage += strResult;
DisplayErrorMessageBox ( strMessage, _E("CL39"), "forboden-programs" );
WriteDebugEventAndReport( 6550, SString( "Showed forboden programs list (%s)", *strResult.Replace( "\n", "" ) ) );
strMessage += SString::Join("\n", foundList);
DisplayErrorMessageBox(strMessage, _E("CL39"), "forboden-programs");
WriteDebugEventAndReport(6550, SString( "Showed forboden programs list (%s)", *SString::Join(",", foundList)));
}
}

Expand Down

0 comments on commit 0ff8b3e

Please sign in to comment.