mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-19 09:45:28 +01:00
Merge branch 'dev' into 'master'
Fix user reset password. Fix NL language See merge request crafty-controller/crafty-4!335
This commit is contained in:
commit
5022723895
@ -60,14 +60,16 @@ class MainPrompt(cmd.Cmd):
|
||||
def do_set_passwd(self, line):
|
||||
|
||||
try:
|
||||
username = str(line).lower()
|
||||
username = line
|
||||
# If no user is found it returns None
|
||||
user_id = self.controller.users.get_id_by_name(username)
|
||||
if not username:
|
||||
Console.error("You must enter a username. Ex: `set_passwd admin'")
|
||||
return False
|
||||
if not user_id:
|
||||
Console.error(f"No user found by the name of {username}")
|
||||
Console.error(
|
||||
f"No user found by the name of {username} this is case sensitive"
|
||||
)
|
||||
return False
|
||||
except:
|
||||
Console.error(f"User: {line} Not Found")
|
||||
|
@ -541,9 +541,12 @@ class ServerInstance:
|
||||
f"Server {self.name} has crash detection enabled "
|
||||
"- starting watcher task"
|
||||
)
|
||||
self.server_scheduler.add_job(
|
||||
self.detect_crash, "interval", seconds=30, id=f"c_{self.server_id}"
|
||||
)
|
||||
try:
|
||||
self.server_scheduler.add_job(
|
||||
self.detect_crash, "interval", seconds=30, id=f"c_{self.server_id}"
|
||||
)
|
||||
except:
|
||||
logger.info(f"Job with id c_{self.server_id} already running...")
|
||||
|
||||
def stop_threaded_server(self):
|
||||
self.stop_server()
|
||||
|
Loading…
x
Reference in New Issue
Block a user