From b037bcda4bbb73e829ef90d41072d9d75d66b24b Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Fri, 25 Apr 2003 08:49:02 +0000 Subject: [PATCH] Changed to only message doJoin when the user hasn't been notified of new messages. --- plugins/Notes.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/Notes.py b/plugins/Notes.py index 10689214a..7256bba8e 100644 --- a/plugins/Notes.py +++ b/plugins/Notes.py @@ -123,15 +123,15 @@ class Notes(callbacks.Privmsg): cursor.execute("""SELECT COUNT(*) FROM notes, users WHERE users.name=%s AND notes.to_id=users.id AND - read=0""", name) - unread = int(cursor.fetchone()[0]) + notified=0""", name) + unnotified = int(cursor.fetchone()[0]) + if unnotified == 0: + return cursor.execute("""SELECT COUNT(*) FROM notes, users WHERE users.name=%s AND notes.to_id=users.id AND - notified=0""", name) - unnotified = int(cursor.fetchone()[0]) - if unnotified != 0: - return + read=0""", name) + unread = int(cursor.fetchone()[0]) s = 'You have %s unread note%s ' \ '%s that I haven\'t told you about before now..' % \ (unread, unread == 1 and ';' or 's;', unnotified)