mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
try fix merge conflict
This commit is contained in:
parent
06a5f4713e
commit
458456a716
@ -253,16 +253,19 @@ class db_shortcuts:
|
||||
query = Commands.select().where(Commands.executed == 0)
|
||||
return self.return_rows(query)
|
||||
|
||||
def get_server_friendly_name(self, server_id):
|
||||
server_data = self.get_server_data_by_id(server_id)
|
||||
@staticmethod
|
||||
def get_server_friendly_name(server_id):
|
||||
server_data = db_helper.get_server_data_by_id(server_id)
|
||||
friendly_name = "{} with ID: {}".format(server_data.get('server_name', None), server_data.get('server_id', 0))
|
||||
return friendly_name
|
||||
|
||||
def send_command(self, user_id, server_id, remote_ip, command):
|
||||
@staticmethod
|
||||
def send_command(user_id, server_id, remote_ip, command):
|
||||
|
||||
server_name = self.get_server_friendly_name(server_id)
|
||||
server_name = db_helper.get_server_friendly_name(server_id)
|
||||
|
||||
self.add_to_audit_log(user_id, "issued command {} for server {}".format(command, server_name),
|
||||
# Example: Admin issued command start_server for server Survival
|
||||
db_helper.add_to_audit_log(user_id, "issued command {} for server {}".format(command, server_name),
|
||||
server_id, remote_ip)
|
||||
|
||||
Commands.insert({
|
||||
|
@ -167,6 +167,7 @@ class TasksManager:
|
||||
else:
|
||||
# Stats are same
|
||||
time.sleep(8)
|
||||
|
||||
def log_watcher(self):
|
||||
console.debug('in log_watcher')
|
||||
helper.check_for_old_logs(db_helper)
|
||||
|
Loading…
Reference in New Issue
Block a user