Wrong password hash size
parent
97f7dcb049
commit
cee5a4cf4f
Binary file not shown.
Binary file not shown.
|
|
@ -428,6 +428,7 @@ namespace Lobbies
|
|||
case LobbyHostInfo.TypeId:
|
||||
{
|
||||
var lobbyHostInfo = LobbyHostInfo.Deserialize(data.Span);
|
||||
|
||||
if (lobbyHostInfo != null)
|
||||
{
|
||||
events.Enqueue(new LobbyClientEvent { EventType = LobbyClientEventTypes.LobbyHostInfo, EventData = lobbyHostInfo });
|
||||
|
|
|
|||
|
|
@ -29,6 +29,26 @@ _ = Task.Run(() =>
|
|||
{
|
||||
switch (lobbyEvent.EventType)
|
||||
{
|
||||
case LobbyClientEventTypes.LobbyJoinFailed:
|
||||
{
|
||||
var lobbyJoinFailReason = lobbyEvent.EventData as LobbyJoinFailReason;
|
||||
var p = Console.GetCursorPosition();
|
||||
Console.SetCursorPosition(0, p.Top);
|
||||
switch (lobbyJoinFailReason!.Reason)
|
||||
{
|
||||
case LobbyJoinFailReason.FailReasons.WrongPassword:
|
||||
Console.WriteLine("Lobby password wrong!");
|
||||
break;
|
||||
case LobbyJoinFailReason.FailReasons.LobbyFull:
|
||||
Console.WriteLine("Lobby full!");
|
||||
break;
|
||||
case LobbyJoinFailReason.FailReasons.LobbyNotFound:
|
||||
Console.WriteLine("Lobby not found!");
|
||||
break;
|
||||
}
|
||||
Console.Write(">");
|
||||
}
|
||||
break;
|
||||
case LobbyClientEventTypes.Connected:
|
||||
{
|
||||
connected = true;
|
||||
|
|
@ -210,7 +230,7 @@ while (running)
|
|||
else
|
||||
{
|
||||
Console.WriteLine("Hosting game ...");
|
||||
lobbyClient.HostLobby(GameGuids.NFS, "Hallo, Welt!", 1, 8, null, myPort);
|
||||
lobbyClient.HostLobby(GameGuids.NFS, "Hallo, Welt!", 1, 8, "haher", myPort);
|
||||
fakeGameHost.isHost = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -234,7 +254,15 @@ while (running)
|
|||
var firstLobby = openLobbies.FirstOrDefault();
|
||||
if (firstLobby != null)
|
||||
{
|
||||
lobbyClient.RequestLobbyHostInfo(firstLobby.Id, null);
|
||||
if(firstLobby.PasswordProtected)
|
||||
{
|
||||
Console.WriteLine("Please enter password: ");
|
||||
Console.Write(">");
|
||||
var password = Console.ReadLine();
|
||||
lobbyClient.RequestLobbyHostInfo(firstLobby.Id, password);
|
||||
}
|
||||
else
|
||||
lobbyClient.RequestLobbyHostInfo(firstLobby.Id, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ namespace LobbyServerDto
|
|||
/// <summary>
|
||||
/// Hash of the password if the lobby requires one
|
||||
/// </summary>
|
||||
[MaxLength(26)]
|
||||
[MaxLength(64)]
|
||||
public byte[]? PasswordHash { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -15,7 +15,7 @@ namespace LobbyServerDto
|
|||
/// <summary>
|
||||
/// Password hash if the lobby is password protected
|
||||
/// </summary>
|
||||
[MaxLength(26)]
|
||||
[MaxLength(64)]
|
||||
public byte[]? PasswordHash { get; set; }
|
||||
/// <summary>
|
||||
/// Our external ip
|
||||
|
|
|
|||
Loading…
Reference in New Issue