From 8d6956f4ae79f43e70615bb8357f3eedb27cf607 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Tue, 6 Jan 2004 02:40:16 +0000 Subject: [PATCH] Add a check for an int id so people who use 'note get' will understand the error message more. --- plugins/Note.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/Note.py b/plugins/Note.py index 92b15f15d..490a58576 100644 --- a/plugins/Note.py +++ b/plugins/Note.py @@ -199,6 +199,11 @@ class Note(callbacks.Privmsg): except KeyError: irc.error(msg, conf.replyNotRegistered) return + try: + noteid = int(noteid) + except ValueError: + irc.error(msg, '%r is not a valid note id.' % noteid) + return db = self.dbHandler.getDb() cursor = db.cursor() cursor.execute("""SELECT note, to_id, from_id, added_at, public