I tried to make a simple chat system with the socket module in Python. everything works, except, that i need to kill the process everytime when i want to shutdown the server. And i don't want to do this everytime.
So my question is:

How can i make a function, that when i type **shutdown** in the server terminal, it shutdowns the whole server?

I already tried to do this:

`def close(self):
 server.close(self)
 server.shutdown(self)`

But it doesn't work. When i type close(), nothing happens. Nothing.

Heres the full code of the server.py:
<https://pastebin.com/gA4QYmQe>
Every help is useful. Thanks.