Skip to content

Commit 206ef63

Browse files
committed
Add annoying warning box on WinXP
1 parent 203f74f commit 206ef63

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

MTA10/mods/shared_logic/luadefs/CLuaBrowserDefs.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,17 @@ void CLuaBrowserDefs::LoadFunctions ( void )
6161
for ( const auto& pair : functions )
6262
{
6363
CLuaCFunctions::AddFunction( pair.first, [](lua_State* luaVM) -> int {
64+
// Show message box eventually
65+
static bool messageBoxShown = false;
66+
if ( !messageBoxShown )
67+
{
68+
g_pCore->ShowMessageBox(_("Unsupported OS"),
69+
_("This server uses browser functions that are not supported on your PC. If you click OK, you are aware that your PC is vulnerable to malware and will most likely join a botnet soon"),
70+
MB_BUTTON_OK | MB_ICON_WARNING);
71+
72+
messageBoxShown = true;
73+
}
74+
6475
g_pCore->DebugPrintfColor ( "Called browser function on unsupported, vulnerable operating system. Please upgrade your OS as soon as possible", 255, 0, 0 );
6576
lua_pushboolean ( luaVM, false );
6677
return 1;

0 commit comments

Comments
 (0)