dice: min/max multipliers are now configurable

This commit is contained in:
moneromooo 2015-01-25 12:36:04 +00:00
parent dea535dd17
commit fb02c61653
2 changed files with 4 additions and 2 deletions

View File

@ -45,6 +45,8 @@ silent_invalid_commands = {
'freenode': ['price','worth','net','pools','calc']
}
dice_min_multiplier=1.1
dice_max_multiplier=10
dice_edge = 0.01
dice_max_bet = 5
dice_min_bet = 0.001

View File

@ -55,8 +55,8 @@ def Dice(link,cmd):
except Exception,e:
link.send("Usage: dice amount multiplier [over|under]")
return
if multiplier < 1.1 or multiplier > 10:
link.send("Invalid multiplier: should be between 1.1 and 10")
if multiplier < float(config.dice_min_multiplier) or multiplier > float(config.dice_max_multiplier):
link.send("Invalid multiplier: should be between %f and %f" % (config.dice_min_multiplier, config.dice_max_multiplier))
return
if overunder == "over":
under=False