From 51cc02892013502ff2d64719037e7aecb228f347 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Tue, 22 Dec 2015 17:23:38 -0800 Subject: [PATCH] Improve dice roll syntax --- modules/dice_roll.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/dice_roll.pl b/modules/dice_roll.pl index cbce5030..fab5beb1 100755 --- a/modules/dice_roll.pl +++ b/modules/dice_roll.pl @@ -18,7 +18,7 @@ if($rolls =~ s/\s*-show\s*//) { $show = 1; } -if($rolls =~ m/^\s*(\d+)d\d+(?:\+\d+)?\s*$/) { +if($rolls =~ m/^\s*(\d+)d\d+(?:\+?-?\d+)?\s*$/) { if($1 > 100) { print "Sorry, maximum of 100 rolls.\n"; die;