mirror of
https://github.com/reality/dbot.git
synced 2025-01-12 04:52:36 +01:00
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 normalizeDiceSpec = function (specString) {
|
||||||
var diceSpec = parseDiceSpec(specString);
|
var diceSpec = parseDiceSpec(specString);
|
||||||
|
|
||||||
|
if (diceSpec["sides"] > 10000) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (diceSpec["count"] > 1000) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (diceSpec["count"] > 1) {
|
if (diceSpec["count"] > 1) {
|
||||||
var count = diceSpec["count"];
|
var count = diceSpec["count"];
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user