mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -05:00
update file localizations
update custom callbacks add server count to master add most played to token list
This commit is contained in:
@ -5,17 +5,26 @@ class History():
|
||||
def __init__(self):
|
||||
self.client_history = list()
|
||||
self.instance_history = list()
|
||||
self.server_history = list()
|
||||
|
||||
def add_client_history(self, client_num):
|
||||
if len(self.client_history) > 1440:
|
||||
if len(self.client_history) > 2880:
|
||||
self.client_history = self.client_history[1:]
|
||||
self.client_history.append({
|
||||
'count' : client_num,
|
||||
'time' : int(time.time())
|
||||
})
|
||||
|
||||
def add_server_history(self, server_num):
|
||||
if len(self.server_history) > 2880:
|
||||
self.server_history = self.server_history[1:]
|
||||
self.server_history.append({
|
||||
'count' : server_num,
|
||||
'time' : int(time.time())
|
||||
})
|
||||
|
||||
def add_instance_history(self, instance_num):
|
||||
if len(self.instance_history) > 1440:
|
||||
if len(self.instance_history) > 2880:
|
||||
self.instance_history = self.instance_history[1:]
|
||||
self.instance_history.append({
|
||||
'count' : instance_num,
|
||||
|
Reference in New Issue
Block a user