.BANCHO. Log user ip in pep.py on login

This commit is contained in:
Howl
2016-05-29 13:32:11 +02:00
committed by Nyo
parent f8c1f49170
commit 3d57bc5bd2
2 changed files with 11 additions and 0 deletions

View File

@@ -297,3 +297,11 @@ def getShowCountry(userID):
if country == None:
return False
return generalFunctions.stringToBool(country)
def IPLog(userID, ip):
"""
Botnet the user
(log his ip for multiaccount detection)
"""
glob.db.execute("""INSERT INTO ip_user (userid, ip, occurencies) VALUES (?, ?, '1')
ON DUPLICATE KEY UPDATE occurencies = occurencies + 1""", [userID, ip])