Skip to content

Commit

Permalink
User time management bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikogenia committed Feb 26, 2024
1 parent 688c494 commit 9e4c8c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions user/user_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,11 366,11 @@ def update(self, data: dict) -> None:
self.logger.debug(f"New player {player.id} [{player.auth_id}] ({player.name}) added.")
if player.time is None:
player.time = self.main.main_config.account_default_time
if self.is_admin(player.user_id):
player.time = 86400
if self.get_user(player.user_id) is not None and \
nc.time.epoch_time() - self.get_user(player.user_id).last_login < self.main.main_config.account_reset_timeout:
player.time = 0
if self.is_admin(player.user_id):
player.time = 86400
self.players.append(player)
new = True
else:
Expand Down

0 comments on commit 9e4c8c5

Please sign in to comment.