Compare commits
No commits in common. "2a05edf78d16a5fdaa702d1be6098f9ace9191a9" and "57f591d0a2a2ad48c1afb157e76c64d040802f22" have entirely different histories.
2a05edf78d
...
57f591d0a2
1 changed files with 13 additions and 23 deletions
|
@ -154,18 +154,8 @@ def karma(room):
|
|||
reply = "Karma standings\n\n"
|
||||
results = Karma.query.filter(Karma.chanid == room).order_by(Karma.karma.desc()).all()
|
||||
for entry in results:
|
||||
try:
|
||||
user, meta = pnutpy.api.get_user(entry.userid)
|
||||
reply += user.username + ": " + str(entry.karma) + "\n"
|
||||
|
||||
except pnutpy.errors.PnutMissing:
|
||||
del_karma = Karma.query.filter(Karma.userid == entry.userid).one_or_none()
|
||||
if del_karma:
|
||||
db_session.delete(del_karma)
|
||||
del_counter = MdnpRequests.query.filter(MdnpRequests.userid == entry.userid).one_or_none()
|
||||
if del_counter:
|
||||
db_session.delete(del_counter)
|
||||
db_session.commit()
|
||||
user, meta = pnutpy.api.get_user(entry.userid)
|
||||
reply += user.username + ": " + str(entry.karma) + "\n"
|
||||
send(room, reply)
|
||||
|
||||
def chimpnut(msg):
|
||||
|
|
Loading…
Reference in a new issue