+ # check nr of total dices
+ nr = 0
+ a.each { |dice|
+ # We use .max with 1 so that specs such as d6 count as 1 and not as 0
+ nr += [dice.split(/d/)[0].to_i, 1].max
+ }
+ if nr > @bot.config['dice.max_dices']
+ m.reply "can't handle more than %u dices" % @bot.config['dice.max_dices']
+ return
+ end