mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
player names should not contain spaces, but in case they do, this makes single-spaces work
This commit is contained in:
@@ -624,8 +624,9 @@ class ServerCommandProcessor(CommandProcessor):
|
|||||||
def default(self, raw: str):
|
def default(self, raw: str):
|
||||||
notify_all(self.ctx, '[Server]: ' + raw)
|
notify_all(self.ctx, '[Server]: ' + raw)
|
||||||
|
|
||||||
def _cmd_kick(self, player_name: str):
|
def _cmd_kick(self, *player_name: str):
|
||||||
"""Kick specified player from the server"""
|
"""Kick specified player from the server"""
|
||||||
|
player_name = " ".join(player_name)
|
||||||
for client in self.ctx.clients:
|
for client in self.ctx.clients:
|
||||||
if client.auth and client.name.lower() == player_name.lower() and client.socket and not client.socket.closed:
|
if client.auth and client.name.lower() == player_name.lower() and client.socket and not client.socket.closed:
|
||||||
asyncio.create_task(client.socket.close())
|
asyncio.create_task(client.socket.close())
|
||||||
|
Reference in New Issue
Block a user