Is there a way to kick clients from the server side? All tutorials do client side kicking.

For context I am using unreal 5.3 and blueprints.

All the youtube tutorials that I have watched talk about having the kick function on the client side by having the server send a request to the client which has a function that moves the client to another level and thus disconnecting them from the server.

But the more think about it isn’t as open for exploitation as you technically could make a modded version of the game that does not activate this kick function. So when the server requests the client to kick, the request will be received but there will be no kick function to trigger.

so it makes me wonder is there a method to kick from the server side?
Or Am I misunderstanding this topic?

The final post has an implementation

AGameSession has a method KickPlayer which takes in a playercontroller (can be saved to array on postlogin) and an FText regarding the reason for the kick

1 Like

is it possible to get this ‘game session’ object in BP? like in Game mode I found something called ‘get game session class’ is that it? I found another thing called ‘cast to game session’, is that it?
In neither of those is there any function called kick or kick player? Am I missing something

It’s not accessible directly from blueprints.
You would have to expose it through c++

definition has no UFUNCTION(BlueprintCallable) to allow it

ENGINE_API virtual bool KickPlayer(APlayerController* KickedPlayer, const FText& KickReason);
1 Like