Custom GameMode class to handle Connection Options when a client connects.

I wrote a quick tutorial on how to pass and read Options when a client connects to the server on my blog.

http://blogs.winterleafentertainment.com/post/passing-and-reading-parameters-on-connection

Hope it helps others,

Good tutorial, alternatively you could use AGameMode::PreLogin and AGameMode::Login as the options are passed to these functions as well, although I think that you can’t kick a player inside there as it is too early in the login process, at least in PreLogin. Still you could set the error message to disallow a login there.

Anyway, is there a specific reason why you copied the whole code over instead of just calling Super::InitNewPlayer? At least that would remove the need for all those extra includes.

I actually changed a good bit of the code in there for our project and I was just trying to give an example for others.

If you’re still about, could you give an example of the proper syntax to pass these options?

In other words, what should the string look like exactly after the “Open 127.0.0.1:7777”?