From f8c85b07bcc192113269778459dc5508bed6f240 Mon Sep 17 00:00:00 2001 From: James Vega Date: Mon, 8 Sep 2003 08:58:00 +0000 Subject: [PATCH] Fixed doPrivmsg and added more useful error messages --- plugins/Notes.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/Notes.py b/plugins/Notes.py index 2e7b2b95b..3d581f161 100644 --- a/plugins/Notes.py +++ b/plugins/Notes.py @@ -144,6 +144,7 @@ class Notes(callbacks.Privmsg): name = ircdb.users.getUserName(msg.prefix) except KeyError: callbacks.Privmsg.doPrivmsg(self, irc, msg) + return cursor = self.db.cursor() cursor.execute("""SELECT COUNT(*) FROM notes, users WHERE users.name=%s AND @@ -205,7 +206,7 @@ class Notes(callbacks.Privmsg): sender = ircdb.users.getUserName(msg.prefix) senderId = self.getUserId(sender) except KeyError: - irc.error(msg, conf.replyNoUser) + irc.error(msg, conf.replyNotRegistered) return cursor = self.db.cursor() cursor.execute("""SELECT notes.note, notes.to_id, notes.from_id, @@ -240,7 +241,7 @@ class Notes(callbacks.Privmsg): try: sender = ircdb.users.getUserName(msg.prefix) except KeyError: - irc.error(msg, conf.replyNoUser) + irc.error(msg, conf.replyNotRegistered) return cursor = self.db.cursor() cursor.execute("""SELECT notes.id, notes.from_id, @@ -272,7 +273,7 @@ class Notes(callbacks.Privmsg): try: sender = ircdb.users.getUserName(msg.prefix) except KeyError: - irc.error(msg, conf.replyNoUser) + irc.error(msg, conf.replyNotRegistered) return cursor = self.db.cursor() cursor.execute("""SELECT notes.id FROM users, notes