From 6b4cb275b3ac99642fd8aa1c4a6838685003b61e Mon Sep 17 00:00:00 2001 From: Minidodo Date: Tue, 9 Aug 2022 17:25:55 +0200 Subject: [PATCH] Fixed temporary bans, and added an option to exclude discord from banning. changed the color of "Time is UP!" in the roll results, as requested. --- modules/core/ban/ban_controller.py | 2 +- modules/core/discord/discord_command_handler.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/core/ban/ban_controller.py b/modules/core/ban/ban_controller.py index 718a0a2..f30bd10 100644 --- a/modules/core/ban/ban_controller.py +++ b/modules/core/ban/ban_controller.py @@ -110,7 +110,7 @@ class BanController(BaseModule): f"SELECT b.*, COALESCE(p1.name, b.char_id) AS name, p2.name AS sender_name FROM ban_list b " f"LEFT JOIN player p1 ON b.char_id = p1.char_id " f"LEFT JOIN player p2 ON b.sender_char_id = p2.char_id " - f"WHERE ended_early < 1 AND (finished_at < ?) " + f"WHERE ended_early < 1 AND (finished_at < ? AND finished_at > 0) " f"ORDER BY b.created_at DESC", [time.time()]) for active in d: diff --git a/modules/core/discord/discord_command_handler.py b/modules/core/discord/discord_command_handler.py index e17d3ea..2295a00 100644 --- a/modules/core/discord/discord_command_handler.py +++ b/modules/core/discord/discord_command_handler.py @@ -44,7 +44,7 @@ class DiscordCommandHandler(BaseModule): def pre_start(self): self.command_service.register_command_channel("Discord", self.DISCORD_CHANNEL) self.setting_service.register(self.module_name, "include_discord_ban", True, BooleanSettingType(), - "Should chatbot bans be extended to discord (Ban from the discord server!):") + "Should chatbot bans be extended to discord (Ban from the discord server!)") @event("discord_command", "should the bot take care of discord commands", False) def discord_command_handler(self, _, event_data):