miguelgrinberg / Flask-SocketIO-Chat

A simple chat application that demonstrates how to structure a Flask-SocketIO application.
http://blog.miguelgrinberg.com/post/easy-websockets-with-flask-and-gevent
MIT License
673 stars 239 forks source link

Commands #23

Closed D4RKW1NT3R closed 4 years ago

D4RKW1NT3R commented 4 years ago

Is there a way to add a command to kick people? I have tinkered with this and made a /clear command but I also want /kick but I have no clue how to add /kick. Is there a way?

miguelgrinberg commented 4 years ago

You can use the disconnect(sid) function to remove a client. Besides that, it depends on your application how you implement the /kick command.

D4RKW1NT3R commented 4 years ago

Could you help me with making this? I can invite you to a repl.it I made and have you help me edit it to add the command. If you can thank you. The link is: https://repl.it/join/yeevqvav-jordandixon1

miguelgrinberg commented 4 years ago

Sorry, my time is limited.