diff --git a/modules/sqlite_local.py b/modules/sqlite_local.py index 50a5129..03af7e4 100644 --- a/modules/sqlite_local.py +++ b/modules/sqlite_local.py @@ -31,4 +31,9 @@ class broker: hashed = self.fnet.encrypt(bytes(password, "UTF-8")).decode() db = self.conn.cursor() db.execute("INSERT INTO nickserv values(?, 'iw', ?, ?);", [nick, hashed, email]) - self.conn.commit() \ No newline at end of file + self.conn.commit() + def nickserv_isexist(self, nick): + db = self.conn.cursor() + db.execute("SELECT * FROM nickserv WHERE user=?;", [nick]) + e = db.fetchall() + return e != [] \ No newline at end of file