From 6688a29453e0f86b12f6bbeefbb041bd998abf69 Mon Sep 17 00:00:00 2001 From: floogal <67554336+floogal@users.noreply.github.com> Date: Wed, 18 Aug 2021 21:55:03 +0100 Subject: [PATCH 1/3] Update moderation.py --- houdini/handlers/play/moderation.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/houdini/handlers/play/moderation.py b/houdini/handlers/play/moderation.py index 1bac2a5..b029469 100644 --- a/houdini/handlers/play/moderation.py +++ b/houdini/handlers/play/moderation.py @@ -111,7 +111,8 @@ async def cheat_ban(p, penguin_id, hours=24, comment=''): if penguin_id in p.server.penguins_by_id: await player.send_error_and_disconnect(611, comment) - + await player.close() + async def moderator_kick(p, penguin_id): if penguin_id in p.server.penguins_by_id: @@ -148,3 +149,5 @@ async def moderator_ban(p, penguin_id, hours=24, comment='', message=''): await player.send_xt('ban', 612, 2, hours, comment) else: await player.send_error_and_disconnect(610, comment) + + await player.close() From 66a880a086cf50f3cc09428b453bc623aed2d36f Mon Sep 17 00:00:00 2001 From: floogal <67554336+floogal@users.noreply.github.com> Date: Wed, 18 Aug 2021 22:53:48 +0100 Subject: [PATCH 2/3] Update moderation.py removed unnecessary update for as2 client and also cheat ban, which already closes the connection --- houdini/handlers/play/moderation.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/houdini/handlers/play/moderation.py b/houdini/handlers/play/moderation.py index b029469..6a5d2a5 100644 --- a/houdini/handlers/play/moderation.py +++ b/houdini/handlers/play/moderation.py @@ -111,7 +111,6 @@ async def cheat_ban(p, penguin_id, hours=24, comment=''): if penguin_id in p.server.penguins_by_id: await player.send_error_and_disconnect(611, comment) - await player.close() async def moderator_kick(p, penguin_id): @@ -147,7 +146,6 @@ async def moderator_ban(p, penguin_id, hours=24, comment='', message=''): if penguin_id in p.server.penguins_by_id: if player.is_vanilla_client: await player.send_xt('ban', 612, 2, hours, comment) + await player.close() else: await player.send_error_and_disconnect(610, comment) - - await player.close() From 9d4c601adc709c90ef0b7d8526afdcf31115c44d Mon Sep 17 00:00:00 2001 From: floogal <67554336+floogal@users.noreply.github.com> Date: Thu, 19 Aug 2021 10:14:07 +0100 Subject: [PATCH 3/3] Update moderation.py Remove unnecessary indentation from blank line --- houdini/handlers/play/moderation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/houdini/handlers/play/moderation.py b/houdini/handlers/play/moderation.py index 6a5d2a5..ed08ce0 100644 --- a/houdini/handlers/play/moderation.py +++ b/houdini/handlers/play/moderation.py @@ -111,7 +111,7 @@ async def cheat_ban(p, penguin_id, hours=24, comment=''): if penguin_id in p.server.penguins_by_id: await player.send_error_and_disconnect(611, comment) - + async def moderator_kick(p, penguin_id): if penguin_id in p.server.penguins_by_id: