From 8300ff2ac38368ebdb8d438f32bb5ee4c97b95f6 Mon Sep 17 00:00:00 2001 From: DrBot7 <46543473+DrBot7@users.noreply.github.com> Date: Sat, 9 Jan 2021 16:09:12 -0600 Subject: [PATCH] Timings - improve offline mode detection --- cogs/timings.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cogs/timings.py b/cogs/timings.py index 9ed96dc..122548c 100644 --- a/cogs/timings.py +++ b/cogs/timings.py @@ -72,11 +72,13 @@ class Timings(commands.Cog): try: online_mode = r["timingsMaster"]["onlinemode"] bungeecord = r["timingsMaster"]["config"]["spigot"]["settings"]["bungeecord"] - if not online_mode and bungeecord == "false": - if not online_mode and bungeecord == "false": - embed_var.add_field(name="❌ online-mode", - value="Enable this in server.properties for security.", - inline=True) + velocity_online_mode = r["timingsMaster"]["config"]["paper"]["settings"]["velocity-support"]["online-mode"] + velocity_enabled = r["timingsMaster"]["config"]["paper"]["settings"]["velocity-support"]["enabled"] + + if not online_mode and bungeecord == "false" and (velocity_online_mode == "false" or velocity_enabled == "false"): + embed_var.add_field(name="❌ online-mode", + value="Enable this in server.properties for security.", + inline=True) except KeyError: unchecked = unchecked + 1