Ejemplo n.º 1
0
 def afterGetIP(res):
     hasFailed(res)
     if not res:  # First time visitor
         return []
     return self.db.runQuery(*Bans.select().where(Bans.type == BAN_TYPES["globalIPBan"] & Bans.recordID == res[0]["id"])).addBoth(afterGetBans, str(ip))
Ejemplo n.º 2
0
 def afterGetUser(res):
     hasFailed(res)
     if not res:  # First time user
         return []
     return self.db.runQuery(*Bans.select().where(Bans.type == BAN_TYPES["globalBan"] & Bans.username == res[0]["username"]).sql()).addBoth(afterGetBans, username)