mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Fix launch check bug.
Automated server starts were not caught
This commit is contained in:
parent
9d1b39d88c
commit
46ca7eeef0
@ -211,19 +211,6 @@ class ServerInstance:
|
||||
|
||||
def run_threaded_server(self, user_id, forge_install=False):
|
||||
# start the server
|
||||
if self.helper.dir_migration:
|
||||
self.helper.websocket_helper.broadcast_user(
|
||||
user_id,
|
||||
"send_start_error",
|
||||
{
|
||||
"error": self.helper.translation.translate(
|
||||
"error",
|
||||
"migration",
|
||||
HelperUsers.get_user_lang_by_id(user_id),
|
||||
)
|
||||
},
|
||||
)
|
||||
return False
|
||||
self.server_thread = threading.Thread(
|
||||
target=self.start_server,
|
||||
daemon=True,
|
||||
@ -321,6 +308,22 @@ class ServerInstance:
|
||||
else:
|
||||
user_lang = HelperUsers.get_user_lang_by_id(user_id)
|
||||
|
||||
# Checks if user is currently attempting to move global server
|
||||
# dir
|
||||
if self.helper.dir_migration:
|
||||
self.helper.websocket_helper.broadcast_user(
|
||||
user_id,
|
||||
"send_start_error",
|
||||
{
|
||||
"error": self.helper.translation.translate(
|
||||
"error",
|
||||
"migration",
|
||||
user_lang,
|
||||
)
|
||||
},
|
||||
)
|
||||
return False
|
||||
|
||||
if self.stats_helper.get_import_status() and not forge_install:
|
||||
if user_id:
|
||||
self.helper.websocket_helper.broadcast_user(
|
||||
|
Loading…
Reference in New Issue
Block a user