looking over my code, if it works i can see a mathematical exploit where if a player types
/pay bob -100 hahaha i just stole all your money
it will actually take their money.
Suggested remedy:
1: check if player is admin... then allow them to steal it!
2: if they are not an admin, convert it to a string, remove the - then convert back to a decimal so the payment they tried to steal actually gets paid instead.. serve them right!
3: or just put in a if (messageText.StartsWith("-", StringComparison.InvariantCultureIgnoreCase) and halt with an error if we want to be boring.
looking over my code, if it works i can see a mathematical exploit where if a player types
/pay bob -100 hahaha i just stole all your money
it will actually take their money.
Suggested remedy: 1: check if player is admin... then allow them to steal it! 2: if they are not an admin, convert it to a string, remove the - then convert back to a decimal so the payment they tried to steal actually gets paid instead.. serve them right! 3: or just put in a if (messageText.StartsWith("-", StringComparison.InvariantCultureIgnoreCase) and halt with an error if we want to be boring.