Compare commits

..

No commits in common. "2a05edf78d16a5fdaa702d1be6098f9ace9191a9" and "57f591d0a2a2ad48c1afb157e76c64d040802f22" have entirely different histories.

View file

@ -154,18 +154,8 @@ def karma(room):
reply = "Karma standings\n\n" reply = "Karma standings\n\n"
results = Karma.query.filter(Karma.chanid == room).order_by(Karma.karma.desc()).all() results = Karma.query.filter(Karma.chanid == room).order_by(Karma.karma.desc()).all()
for entry in results: for entry in results:
try: user, meta = pnutpy.api.get_user(entry.userid)
user, meta = pnutpy.api.get_user(entry.userid) reply += user.username + ": " + str(entry.karma) + "\n"
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()
send(room, reply) send(room, reply)
def chimpnut(msg): def chimpnut(msg):