.BANCHO. Set ban_datetime when banning
This commit is contained in:
parent
e0d5348b48
commit
b1e4314990
|
@ -286,7 +286,8 @@ def setAllowed(userID, allowed):
|
|||
userID -- user
|
||||
allowed -- allowed status. 1: normal, 0: banned
|
||||
"""
|
||||
glob.db.execute("UPDATE users SET allowed = %s WHERE id = %s", [allowed, userID])
|
||||
banDateTime = int(time.time()) if allowed == 0 else 0
|
||||
glob.db.execute("UPDATE users SET allowed = %s, ban_datetime = %s WHERE id = %s", [allowed, banDateTime, userID])
|
||||
|
||||
def setCountry(userID, country):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user