Fix parsing error in dice contrib. Resolves #1047.
This commit is contained in:
parent
e0e8e9453a
commit
3d6f65fcdd
1 changed files with 2 additions and 2 deletions
|
|
@ -162,7 +162,7 @@ class CmdDice(default_cmds.MuxCommand):
|
||||||
return
|
return
|
||||||
argstring = "".join(str(arg) for arg in self.args)
|
argstring = "".join(str(arg) for arg in self.args)
|
||||||
|
|
||||||
parts = RE_PARTS.split(self.args)
|
parts = [part for part in RE_PARTS.split(self.args) if part]
|
||||||
lparts = len(parts)
|
lparts = len(parts)
|
||||||
|
|
||||||
ndice = 0
|
ndice = 0
|
||||||
|
|
@ -171,7 +171,7 @@ class CmdDice(default_cmds.MuxCommand):
|
||||||
conditional = None
|
conditional = None
|
||||||
|
|
||||||
if lparts < 3 or parts[1] != 'd':
|
if lparts < 3 or parts[1] != 'd':
|
||||||
self.caller.msg("You must specify the die roll(s) as <nr>d<sides>. So 2d6 means rolling a 6-sided die 2 times.")
|
self.caller.msg("You must specify the die roll(s) as <nr>d<sides>. For example, 2d6 means rolling a 6-sided die 2 times.")
|
||||||
return
|
return
|
||||||
|
|
||||||
# Limit the number of dice and sides a character can roll to prevent server slow down and crashes
|
# Limit the number of dice and sides a character can roll to prevent server slow down and crashes
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue