.BANCHO. Add timezones
This commit is contained in:
@@ -35,7 +35,7 @@ class token:
|
||||
"""
|
||||
|
||||
|
||||
def __init__(self, __userID, token = None, ip = "", irc = False):
|
||||
def __init__(self, __userID, token = None, ip = "", irc = False, timeOffset = 0):
|
||||
"""
|
||||
Create a token object and set userID and token
|
||||
|
||||
@@ -55,6 +55,7 @@ class token:
|
||||
self.restricted = userHelper.isRestricted(self.userID)
|
||||
self.loginTime = int(time.time())
|
||||
self.pingTime = self.loginTime
|
||||
self.timeOffset = timeOffset
|
||||
self.lock = threading.Lock() # Sync primitive
|
||||
|
||||
# Default variables
|
||||
|
@@ -19,7 +19,7 @@ class tokenList:
|
||||
"""
|
||||
self.tokens = {}
|
||||
|
||||
def addToken(self, userID, ip = "", irc = False):
|
||||
def addToken(self, userID, ip = "", irc = False, timeOffset=0):
|
||||
"""
|
||||
Add a token object to tokens list
|
||||
|
||||
@@ -28,7 +28,7 @@ class tokenList:
|
||||
return -- token object
|
||||
"""
|
||||
|
||||
newToken = osuToken.token(userID, ip=ip, irc=irc)
|
||||
newToken = osuToken.token(userID, ip=ip, irc=irc, timeOffset=timeOffset)
|
||||
self.tokens[newToken.token] = newToken
|
||||
return newToken
|
||||
|
||||
|
Reference in New Issue
Block a user