Update moderation.py

removed unnecessary update for as2 client and also cheat ban, which already closes the connection
This commit is contained in:
floogal 2021-08-18 22:53:48 +01:00 committed by GitHub
parent 6688a29453
commit 66a880a086
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,7 +111,6 @@ async def cheat_ban(p, penguin_id, hours=24, comment=''):
if penguin_id in p.server.penguins_by_id: if penguin_id in p.server.penguins_by_id:
await player.send_error_and_disconnect(611, comment) await player.send_error_and_disconnect(611, comment)
await player.close()
async def moderator_kick(p, penguin_id): 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 penguin_id in p.server.penguins_by_id:
if player.is_vanilla_client: if player.is_vanilla_client:
await player.send_xt('ban', 612, 2, hours, comment) await player.send_xt('ban', 612, 2, hours, comment)
await player.close()
else: else:
await player.send_error_and_disconnect(610, comment) await player.send_error_and_disconnect(610, comment)
await player.close()