forked from GitHub/dbot
fix dice crash
This commit is contained in:
parent
96b2dd0ddd
commit
7faa5c1207
@ -17,6 +17,14 @@ var parseDiceSpec = function (specString) {
|
||||
var normalizeDiceSpec = function (specString) {
|
||||
var diceSpec = parseDiceSpec(specString);
|
||||
|
||||
if (diceSpec["sides"] > 10000) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (diceSpec["count"] > 1000) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (diceSpec["count"] > 1) {
|
||||
var count = diceSpec["count"];
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user