Open JulenRa-dev opened 6 days ago
You can send a message to the client to shut down process_net_event Server :
def kick(client,reason):
client.send_message("kick",reason) # Send a message containing "kick" with content reason
Client :
# Your code, imports, definitions etc
kick=False
@Client.event
def kick(reason):
global kick
kick = True
print(reason) # you can add a reason if you want. If not replace the reason variable on the server to any value you want
while kick=False:
Client.process_net_event()
# Other stuff
.Is there some way to make the server kick a client? For example, something like
for client in server.get_clients(): if client.toofast: server.kick_client(client)