mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-25 12:12:54 +01:00
Still toying with sql syntax
This commit is contained in:
parent
2db2f64696
commit
9808581d37
@ -106,9 +106,10 @@ class Notes(DBHandler, callbacks.Privmsg):
|
|||||||
"set a note as unread"
|
"set a note as unread"
|
||||||
noteid = privmsgs.getArgs(args)
|
noteid = privmsgs.getArgs(args)
|
||||||
self.cursor.execute("""UPDATE notes
|
self.cursor.execute("""UPDATE notes
|
||||||
SET read="False"
|
SET read='False'
|
||||||
where id = %d""" % int(noteid))
|
where id = %d""" % int(noteid))
|
||||||
self.db.commit()
|
self.db.commit()
|
||||||
|
irc.reply(msg, conf.replySuccess)
|
||||||
|
|
||||||
def sendnote(self, irc, msg, args):
|
def sendnote(self, irc, msg, args):
|
||||||
"sends a new note to an IRC user"
|
"sends a new note to an IRC user"
|
||||||
@ -126,10 +127,10 @@ class Notes(DBHandler, callbacks.Privmsg):
|
|||||||
recipID = self.getUserID(recipient)
|
recipID = self.getUserID(recipient)
|
||||||
if ircutils.isChannel(msg.args[0]): public = "True"
|
if ircutils.isChannel(msg.args[0]): public = "True"
|
||||||
else: public = "False"
|
else: public = "False"
|
||||||
self.cursor.execute("""INSERT INTO notes
|
self.cursor.execute("""INSERT INTO notes VALUES
|
||||||
VALUES (%d,%d,%d,'False',%s,%s)""" %\
|
(NULL, %d, %d, %d, %s, %s, %s)""",
|
||||||
(int(senderID), int(recipID), int(time.time()),
|
int(senderID), int(recipID), time.time(),
|
||||||
public, note))
|
'False', public, note)
|
||||||
self.db.commit()
|
self.db.commit()
|
||||||
irc.reply(msg, conf.replySuccess)
|
irc.reply(msg, conf.replySuccess)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user