make dice case-insensitive, improve remember.py:forget formatting
This commit is contained in:
parent
35d0444f13
commit
cf4b7e50e5
|
@ -9,9 +9,10 @@ from util import hook
|
|||
|
||||
|
||||
whitespace_re = re.compile(r'\s+')
|
||||
valid_diceroll_re = re.compile(r'^[+-]?(\d+|\d*d\d+)([+-](\d+|\d*d\d+))*$')
|
||||
sign_re = re.compile(r'[+-]?(?:\d*d)?\d+')
|
||||
split_re = re.compile(r'([\d+-]*)d?(\d*)')
|
||||
valid_diceroll_re = re.compile(r'^[+-]?(\d+|\d*d\d+)([+-](\d+|\d*d\d+))*$',
|
||||
re.I)
|
||||
sign_re = re.compile(r'[+-]?(?:\d*d)?\d+', re.I)
|
||||
split_re = re.compile(r'([\d+-]*)d?(\d*)', re.I)
|
||||
|
||||
|
||||
def nrolls(count, n):
|
||||
|
|
|
@ -53,7 +53,7 @@ def forget(inp, chan='', db=None):
|
|||
db.execute("delete from memory where chan=? and word=lower(?)",
|
||||
(chan, inp))
|
||||
db.commit()
|
||||
return 'forgot that %r' % data
|
||||
return 'forgot that "%s"' % data.replace('"', "''")
|
||||
else:
|
||||
return "I don't know about that."
|
||||
|
||||
|
|
Loading…
Reference in New Issue