Prevent from scamming

This commit is contained in:
Andrzej Pomirski 2014-03-12 12:50:39 +01:00
parent 85371eefd7
commit e18269a7b7
1 changed files with 5 additions and 0 deletions

View File

@ -30,6 +30,11 @@ public class PriceChecker implements Listener {
return;
}
if (line.indexOf('B') != line.lastIndexOf('B') || line.indexOf('S') != line.lastIndexOf('S')) {
event.setOutcome(INVALID_PRICE);
return;
}
if (isPrice(part[0])) {
line = "B " + line;
}