Page 1 of 1

Close network connection to client

Posted: Tue Mar 10, 2020 6:24 pm
by Tetragromaton
Hey guys, is there anyway to disconnect client from server by the way of closing connection to them, so client will just see that there is a server experiencing some troubles | Auto disconnect in N seconds ?
Is this possible to realise at the sourcepython level ?

Re: Close network connection to client

Posted: Fri Mar 13, 2020 2:36 am
by L'In20Cible
Tetragromaton wrote:Hey guys, is there anyway to disconnect client from server by the way of closing connection to them, so client will just see that there is a server experiencing some troubles | Auto disconnect in N seconds ?
Is this possible to realise at the sourcepython level ?

I don't think there is an easy way to do that. You could probably achieve something like that with a lot of hooking into the networking stuff, but it doesn't worth the effort in my opinion. Why is simply kicking the player not an option?

Re: Close network connection to client

Posted: Fri Mar 13, 2020 2:45 am
by Hymns For Disco
If running a linux server, you could try use the iptables command to block the client's address.
This is probably the cleanest way to artificially force a connection drop.