Update stocks.pwn

adds security check on /shares so that if the acc isn't verified, he won't be able to sell those shares
This commit is contained in:
Sultan1337 2019-07-07 09:06:49 -07:00 committed by GitHub
parent 839dee2479
commit 52762c04a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -846,9 +846,14 @@ CMD:stockmarkets( playerid, params[ ] )
} }
CMD:shares( playerid, params[ ] ) CMD:shares( playerid, params[ ] )
{
if ( p_accountSecurityData[ playerid ] [ E_ID ] && ! p_accountSecurityData[ playerid ] [ E_VERIFIED ] && p_accountSecurityData[ playerid ] [ E_MODE ] != SECURITY_MODE_DISABLED )
return SendError( playerid, "You must be verified in order to use this feature. "COL_YELLOW"(use /verify)" );
else
{ {
return ShowPlayerShares( playerid ); return ShowPlayerShares( playerid );
} }
}
CMD:astock( playerid, params[ ] ) CMD:astock( playerid, params[ ] )
{ {