From f11e9c88011afafa4f436396fccc25d4881e753b Mon Sep 17 00:00:00 2001 From: ccd0 Date: Tue, 29 Jul 2014 09:05:33 -0700 Subject: [PATCH] show actual number of dice rolled when 4chan's limit (currently 25) is exceeded --- src/Miscellaneous/Dice.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Miscellaneous/Dice.coffee b/src/Miscellaneous/Dice.coffee index d02698344..103507a15 100755 --- a/src/Miscellaneous/Dice.coffee +++ b/src/Miscellaneous/Dice.coffee @@ -6,6 +6,6 @@ Dice = cb: @node node: -> return if @isClone or not dicestats = @info.email?.match /dice[+\s](\d+)d(\d+)/ - # Use the text node directly, as the has two
. + # Use the text node directly, as the has two
. Count dice since 4chan imposes a maximum. roll = $('b', @nodes.comment).firstChild - roll.data = "Rolled #{dicestats[1]}d#{dicestats[2]}: #{roll.data.slice 7}" + roll.data = "Rolled #{roll.data.split(',').length}d#{dicestats[2]}: #{roll.data.slice 7}"