I have a specific game mode when starting a connection to the server.
I would like to validate a user connection base on its username and password.
When I launch the client, The PreLogin function is automatically called, which is ok.
void AKGameMode_Menu::PreLogin(const FString& Options, const FString& Address, const TSharedPtr<const FUniqueNetId>& UniqueId, FString& ErrorMessage)
{
Super::PreLogin(Options, Address, UniqueId, ErrorMessage);
}
APlayerController* AKGameMode_Menu::Login(class UPlayer* NewPlayer, ENetRole InRemoteRole, const FString& Portal, const FString& Options, const TSharedPtr<const FUniqueNetId>& UniqueId, FString& ErrorMessage)
{
return Super::Login(NewPlayer, InRemoteRole, Portal, Options, UniqueId, ErrorMessage);
}
void AKGameMode_Menu::PostLogin(APlayerController* NewPlayer)
{
Super::PostLogin(NewPlayer);
}
The PreLogin does not set an error message, which means approved.
But I do not understand why the function Login and PostLogin is never called ?
Do I have to check the username and the password in PreLogin ?
I have also a problem with the arguments LOGIN and PASSWORD documented in link text
How can I retrieve these two arguments since if I specify these two options in the the command line -login=aaa -password=xxx I don’t know where there are.
Txs for your help,
D