Fixed .forget
This commit is contained in:
parent
5aa8f66cd7
commit
506cdd80de
1 changed files with 3 additions and 7 deletions
|
@ -22,7 +22,6 @@ def get_memory(db, word):
|
||||||
|
|
||||||
|
|
||||||
@hook.regex(r'^\+ ?(.*)')
|
@hook.regex(r'^\+ ?(.*)')
|
||||||
@hook.command("r")
|
|
||||||
def remember(inp, nick='', db=None, say=None, input=None, notice=None):
|
def remember(inp, nick='', db=None, say=None, input=None, notice=None):
|
||||||
"+<word> [+]<data> -- maps word to data in the memory"
|
"+<word> [+]<data> -- maps word to data in the memory"
|
||||||
if input.nick not in input.bot.config["admins"]:
|
if input.nick not in input.bot.config["admins"]:
|
||||||
|
@ -71,11 +70,9 @@ def remember(inp, nick='', db=None, say=None, input=None, notice=None):
|
||||||
|
|
||||||
@hook.command
|
@hook.command
|
||||||
def forget(inp, db=None):
|
def forget(inp, db=None):
|
||||||
"-<word> -- forgets the mapping that word had"
|
".forget <word> -- forgets the mapping that word had"
|
||||||
|
if input.nick not in input.bot.config["admins"]:
|
||||||
binp = inp.group(0)
|
return
|
||||||
bind = binp.replace('-', '', 1)
|
|
||||||
print bind
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
head, tail = bind.split(None, 1)
|
head, tail = bind.split(None, 1)
|
||||||
|
@ -93,7 +90,6 @@ def forget(inp, db=None):
|
||||||
else:
|
else:
|
||||||
return "I don't know about that."
|
return "I don't know about that."
|
||||||
|
|
||||||
@hook.command("info")
|
|
||||||
@hook.regex(r'^\? ?(.+)')
|
@hook.regex(r'^\? ?(.+)')
|
||||||
def question(inp, say=None, db=None):
|
def question(inp, say=None, db=None):
|
||||||
"?<word> -- shows what data is associated with word"
|
"?<word> -- shows what data is associated with word"
|
||||||
|
|
Reference in a new issue