Skip to content

Commit 9fc2ceb

Browse files
committed
Add error response on failed to add grab
1 parent cd33b0c commit 9fc2ceb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

plugins/grab.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,13 @@ def grab(text, nick, chan, db, conn):
100100
# check to see if the quote has been added
101101
if check_grabs(name.lower(), msg, chan):
102102
return "I already have that quote from {} in the database".format(text)
103-
break
104103
else:
105104
# the quote is new so add it to the db.
106105
grab_add(name.lower(),timestamp, msg, chan, db, conn)
107106
if check_grabs(name.lower(), msg, chan):
108107
return "the operation succeeded."
109-
break
108+
else:
109+
return "the operation failed"
110110
return "I couldn't find anything from {} in recent history.".format(text)
111111

112112
def format_grab(name, quote):

0 commit comments

Comments
 (0)