split roll string and properly ignore "roll" from roll attempt
This commit is contained in:
parent
5b44b66c4d
commit
27b27ecb61
|
@ -26,10 +26,10 @@ from Module import Module
|
|||
class Dice(Module):
|
||||
|
||||
def do(self, connection, event, nick, userhost, replypath, what, admin_unlocked):
|
||||
overallroll = what
|
||||
whats = what.split(' ')
|
||||
|
||||
if what.split(' ')[0] == 'roll':
|
||||
rolls = re.split(';\s*', overallroll)
|
||||
if whats[0] == 'roll':
|
||||
rolls = re.split(';\s*', ' '.join(whats[1:]))
|
||||
reply = ""
|
||||
for roll in rolls:
|
||||
pattern = '^(?:(\d+)#)?(?:(\d+)/)?(\d+)?d(\d+)(?:(\+|\-)(\d+))?(?:\s+(.*))?'
|
||||
|
|
Loading…
Reference in New Issue