diff --git a/app/classes/minecraft/stats.py b/app/classes/minecraft/stats.py index fc983fe7..305239e8 100644 --- a/app/classes/minecraft/stats.py +++ b/app/classes/minecraft/stats.py @@ -250,7 +250,7 @@ class Stats: Server_Stats.version: server.get("version", False) }).execute() - # delete 1 week old data + # delete old data max_age = helper.get_setting("history_max_age") now = datetime.datetime.now() last_week = now.day - max_age diff --git a/app/classes/shared/models.py b/app/classes/shared/models.py index 12bbfd11..ef4e20c5 100644 --- a/app/classes/shared/models.py +++ b/app/classes/shared/models.py @@ -83,6 +83,7 @@ class Servers(BaseModel): auto_start_delay = IntegerField(default=10) crash_detection = BooleanField(default=0) stop_command = CharField(default="stop") + server_ip = CharField(default="127.0.0.1") server_port = IntegerField(default=25565) class Meta: diff --git a/app/classes/web/panel_handler.py b/app/classes/web/panel_handler.py index e4a3460a..977c51ad 100644 --- a/app/classes/web/panel_handler.py +++ b/app/classes/web/panel_handler.py @@ -128,6 +128,7 @@ class PanelHandler(BaseHandler): execution_command = self.get_argument('execution_command', None) stop_command = self.get_argument('stop_command', None) auto_start_delay = self.get_argument('auto_start_delay', '10') + server_ip = self.get_argument('server_ip', None) server_port = self.get_argument('server_port', None) auto_start = int(float(self.get_argument('auto_start', '0'))) crash_detection = int(float(self.get_argument('crash_detection', '0'))) @@ -152,6 +153,7 @@ class PanelHandler(BaseHandler): Servers.execution_command: execution_command, Servers.stop_command: stop_command, Servers.auto_start_delay: auto_start_delay, + Servers.server_ip: server_ip, Servers.server_port: server_port, Servers.auto_start: auto_start, Servers.crash_detection: crash_detection, diff --git a/app/frontend/templates/panel/server_config.html b/app/frontend/templates/panel/server_config.html index a14732fb..39d6d0b1 100644 --- a/app/frontend/templates/panel/server_config.html +++ b/app/frontend/templates/panel/server_config.html @@ -103,7 +103,12 @@