Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Region protection #2

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

Track07-cda
Copy link

Add the ability to protect specific region files from adding to the update list and other associated functions.

@Track07-cda Track07-cda closed this Nov 7, 2021
@Track07-cda Track07-cda reopened this Nov 7, 2021
@Fallen-Breath
Copy link
Collaborator

Why don't you save the protection region list to disk but just simply let it get lost after server stop?

@Track07-cda
Copy link
Author

Now it saves protected regions to the disk.

@@ -80,15 +88,18 @@ def __repr__(self):
def print_log(server: ServerInterface, msg: str):
server.logger.info(msg)
with open(LogFilePath, 'a') as logfile:
logfile.write(time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())) + ': ' + msg + '\n')
logfile.write(time.strftime('%Y-%m-%d %H:%M:%S',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't make unrelated code formatting. Same as changes below

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants