mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
Changed to only message doJoin when the user hasn't been notified of new messages.
This commit is contained in:
parent
8d0d138850
commit
b037bcda4b
@ -123,15 +123,15 @@ class Notes(callbacks.Privmsg):
|
|||||||
cursor.execute("""SELECT COUNT(*) FROM notes, users
|
cursor.execute("""SELECT COUNT(*) FROM notes, users
|
||||||
WHERE users.name=%s AND
|
WHERE users.name=%s AND
|
||||||
notes.to_id=users.id AND
|
notes.to_id=users.id AND
|
||||||
read=0""", name)
|
notified=0""", name)
|
||||||
unread = int(cursor.fetchone()[0])
|
unnotified = int(cursor.fetchone()[0])
|
||||||
|
if unnotified == 0:
|
||||||
|
return
|
||||||
cursor.execute("""SELECT COUNT(*) FROM notes, users
|
cursor.execute("""SELECT COUNT(*) FROM notes, users
|
||||||
WHERE users.name=%s AND
|
WHERE users.name=%s AND
|
||||||
notes.to_id=users.id AND
|
notes.to_id=users.id AND
|
||||||
notified=0""", name)
|
read=0""", name)
|
||||||
unnotified = int(cursor.fetchone()[0])
|
unread = int(cursor.fetchone()[0])
|
||||||
if unnotified != 0:
|
|
||||||
return
|
|
||||||
s = 'You have %s unread note%s ' \
|
s = 'You have %s unread note%s ' \
|
||||||
'%s that I haven\'t told you about before now..' % \
|
'%s that I haven\'t told you about before now..' % \
|
||||||
(unread, unread == 1 and ';' or 's;', unnotified)
|
(unread, unread == 1 and ';' or 's;', unnotified)
|
||||||
|
Loading…
Reference in New Issue
Block a user