コード例 #1
0
ファイル: factory.py プロジェクト: tyteen4a03/cloudBox
 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))
コード例 #2
0
ファイル: factory.py プロジェクト: tyteen4a03/cloudBox
 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)