mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-02-10 10:10:52 +00:00
Potentially fix join passwords
This commit is contained in:
parent
49a1037f6b
commit
2406302911
2 changed files with 22 additions and 1 deletions
|
@ -1147,6 +1147,7 @@ static UINT8 cl_challengequestion[MD5_LEN+1];
|
||||||
static char cl_challengepassword[65];
|
static char cl_challengepassword[65];
|
||||||
static UINT8 cl_challengeanswer[MD5_LEN+1];
|
static UINT8 cl_challengeanswer[MD5_LEN+1];
|
||||||
static UINT8 cl_challengeattempted = 0;
|
static UINT8 cl_challengeattempted = 0;
|
||||||
|
static char cl_challengeaddress[64];
|
||||||
|
|
||||||
// Player name send/load
|
// Player name send/load
|
||||||
|
|
||||||
|
@ -2275,6 +2276,8 @@ boolean CL_Responder(event_t *ev)
|
||||||
|
|
||||||
#ifndef NONET
|
#ifndef NONET
|
||||||
SL_ClearServerList(servernode);
|
SL_ClearServerList(servernode);
|
||||||
|
if (I_NetMakeNodewPort)
|
||||||
|
servernode = I_NetMakeNode(cl_challengeaddress);
|
||||||
#endif
|
#endif
|
||||||
cl_mode = CL_SEARCHING;
|
cl_mode = CL_SEARCHING;
|
||||||
|
|
||||||
|
@ -3794,7 +3797,7 @@ static void HandleConnect(SINT8 node)
|
||||||
D_MakeJoinPasswordChallenge(&netbuffer->u.joinchallenge.challengenum, netbuffer->u.joinchallenge.question);
|
D_MakeJoinPasswordChallenge(&netbuffer->u.joinchallenge.challengenum, netbuffer->u.joinchallenge.question);
|
||||||
|
|
||||||
netbuffer->packettype = PT_JOINCHALLENGE;
|
netbuffer->packettype = PT_JOINCHALLENGE;
|
||||||
HSendPacket(node, true, 0, sizeof(joinchallenge_pak));
|
HSendPacket(node, false, 0, sizeof(joinchallenge_pak));
|
||||||
Net_CloseConnection(node);
|
Net_CloseConnection(node);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -4017,6 +4020,8 @@ static void HandlePacketFromAwayNode(SINT8 node)
|
||||||
cl_challengenum = netbuffer->u.joinchallenge.challengenum;
|
cl_challengenum = netbuffer->u.joinchallenge.challengenum;
|
||||||
memcpy(cl_challengequestion, netbuffer->u.joinchallenge.question, 16);
|
memcpy(cl_challengequestion, netbuffer->u.joinchallenge.question, 16);
|
||||||
|
|
||||||
|
if (I_GetNodeAddress)
|
||||||
|
strcpy(cl_challengeaddress, I_GetNodeAddress(node));
|
||||||
Net_CloseConnection(node); // Don't need to stay connected while challenging
|
Net_CloseConnection(node); // Don't need to stay connected while challenging
|
||||||
|
|
||||||
cl_mode = CL_CHALLENGE;
|
cl_mode = CL_CHALLENGE;
|
||||||
|
@ -4026,6 +4031,10 @@ static void HandlePacketFromAwayNode(SINT8 node)
|
||||||
case 2:
|
case 2:
|
||||||
// We already sent a correct password, so throw it back up again.
|
// We already sent a correct password, so throw it back up again.
|
||||||
D_ComputeChallengeAnswer(cl_challengequestion, cl_challengepassword, cl_challengeanswer);
|
D_ComputeChallengeAnswer(cl_challengequestion, cl_challengepassword, cl_challengeanswer);
|
||||||
|
#ifndef NONET
|
||||||
|
if (I_NetMakeNodewPort)
|
||||||
|
servernode = I_NetMakeNode(cl_challengeaddress);
|
||||||
|
#endif
|
||||||
cl_mode = CL_ASKJOIN;
|
cl_mode = CL_ASKJOIN;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
12
src/d_net.c
12
src/d_net.c
|
@ -781,6 +781,8 @@ static const char *packettypename[NUMPACKETTYPE] =
|
||||||
{
|
{
|
||||||
"NOTHING",
|
"NOTHING",
|
||||||
"SERVERCFG",
|
"SERVERCFG",
|
||||||
|
|
||||||
|
|
||||||
"CLIENTCMD",
|
"CLIENTCMD",
|
||||||
"CLIENTMIS",
|
"CLIENTMIS",
|
||||||
"CLIENT2CMD",
|
"CLIENT2CMD",
|
||||||
|
@ -801,6 +803,9 @@ static const char *packettypename[NUMPACKETTYPE] =
|
||||||
"RESYNCHEND",
|
"RESYNCHEND",
|
||||||
"RESYNCHGET",
|
"RESYNCHGET",
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
"CLIENT3CMD",
|
"CLIENT3CMD",
|
||||||
"CLIENT3MIS",
|
"CLIENT3MIS",
|
||||||
"CLIENT4CMD",
|
"CLIENT4CMD",
|
||||||
|
@ -811,13 +816,20 @@ static const char *packettypename[NUMPACKETTYPE] =
|
||||||
"DOWNLOADFILESOKAY",
|
"DOWNLOADFILESOKAY",
|
||||||
|
|
||||||
"FILEFRAGMENT",
|
"FILEFRAGMENT",
|
||||||
|
|
||||||
"TEXTCMD",
|
"TEXTCMD",
|
||||||
"TEXTCMD2",
|
"TEXTCMD2",
|
||||||
"TEXTCMD3",
|
"TEXTCMD3",
|
||||||
"TEXTCMD4",
|
"TEXTCMD4",
|
||||||
|
|
||||||
"CLIENTJOIN",
|
"CLIENTJOIN",
|
||||||
"NODETIMEOUT",
|
"NODETIMEOUT",
|
||||||
"RESYNCHING",
|
"RESYNCHING",
|
||||||
|
|
||||||
|
|
||||||
|
"TELLFILESNEEDED",
|
||||||
|
"MOREFILESNEEDED",
|
||||||
|
|
||||||
"PING"
|
"PING"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue