Merge branch '2.3' into 2.4-pr

This commit is contained in:
RaidMax 2019-08-12 20:09:31 -05:00
commit 320b01d15c
2 changed files with 5 additions and 5 deletions

View File

@ -8,7 +8,7 @@ class LogReader(object):
def __init__(self):
self.log_file_sizes = {}
# (if the time between checks is greater, ignore ) - in seconds
self.max_file_time_change = 60
self.max_file_time_change = 30
def read_file(self, path, retrieval_key):
# this removes old entries that are no longer valid
@ -40,8 +40,8 @@ class LogReader(object):
next_retrieval_key = self._generate_key()
# this is the first time the key has been requested, so we need to the next one
if retrieval_key not in self.log_file_sizes:
print('retrieval key "%s" does not exist' % retrieval_key)
if retrieval_key not in self.log_file_sizes or int(time.time() - self.log_file_sizes[retrieval_key]['read']) > self.max_file_time_change:
print('retrieval key "%s" does not exist or is outdated' % retrieval_key)
last_log_info = {
'size' : new_file_size,
'previous_key' : None

View File

@ -254,7 +254,7 @@ namespace SharedLibraryCore.Database.Models
e.FailReason = GameEvent.EventFailReason.Permission;
}
else if (Level == Permission.Flagged)
else if (Level == Permission.Flagged || Level == Permission.Banned)
{
e.FailReason = GameEvent.EventFailReason.Invalid;
}
@ -286,7 +286,7 @@ namespace SharedLibraryCore.Database.Models
e.FailReason = GameEvent.EventFailReason.Permission;
}
else if (Level != Permission.Flagged)
else if (Level != Permission.Flagged || Level == Permission.Banned)
{
e.FailReason = GameEvent.EventFailReason.Invalid;
}