Commit fef5f1ef authored by Svetlana Tkachenko's avatar Svetlana Tkachenko
Browse files

Add case insensivity to seen plugin

parent de7c3314
......@@ -61,12 +61,12 @@ class Seen(object):
# print("Message '{0}' from '{1}' in '{2}'".format(message, nick, channel))
# add to db
# nick, timestamp, network, channel message
self.cursor.execute('INSERT OR REPLACE INTO seen VALUES (?, ?, ?, ?, ?)', (nick, time.time(), self.network, channel, message))
self.cursor.execute('INSERT OR REPLACE INTO seen VALUES (?, ?, ?, ?, ?)', (nick.lower(), time.time(), self.network, channel, message))
self.connection.commit()
def handle_command(self, channel, user, cmd, args):
if cmd == "seen":
nick = args[0]
nick = args[0].lower()
self.cursor.execute('SELECT * FROM seen WHERE nick = ? and network = ?', (nick, self.network))
info = self.cursor.fetchone()
if info:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment