Adapt to yaboli changes
This commit is contained in:
parent
5d94829249
commit
2211e8568e
1 changed files with 4 additions and 4 deletions
|
|
@ -24,8 +24,8 @@ class PointDB(yaboli.Database):
|
||||||
db.commit()
|
db.commit()
|
||||||
|
|
||||||
@yaboli.operation
|
@yaboli.operation
|
||||||
def add_point(db, nick):
|
def add_point(self, db, nick):
|
||||||
nick = mention_reduced(nick)
|
nick = normalize(nick)
|
||||||
|
|
||||||
cur = db.cursor()
|
cur = db.cursor()
|
||||||
cur.execute("INSERT OR IGNORE INTO Points (nick, points) VALUES (?, 0)", (nick,))
|
cur.execute("INSERT OR IGNORE INTO Points (nick, points) VALUES (?, 0)", (nick,))
|
||||||
|
|
@ -33,8 +33,8 @@ class PointDB(yaboli.Database):
|
||||||
db.commit()
|
db.commit()
|
||||||
|
|
||||||
@yaboli.operation
|
@yaboli.operation
|
||||||
def points_of(db, nick):
|
def points_of(self, db, nick):
|
||||||
nick = mention_reduced(nick)
|
nick = normalize(nick)
|
||||||
|
|
||||||
cur = db.execute("SELECT points FROM Points WHERE nick=?", (nick,))
|
cur = db.execute("SELECT points FROM Points WHERE nick=?", (nick,))
|
||||||
res = cur.fetchone()
|
res = cur.fetchone()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue