mirror of
				https://github.com/KartKrewDev/RingRacers.git
				synced 2025-10-30 08:01:28 +00:00 
			
		
		
		
	Potentially fix join passwords
This commit is contained in:
		
							parent
							
								
									e6d7af623a
								
							
						
					
					
						commit
						6ea0492008
					
				
					 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 UINT8 cl_challengeanswer[MD5_LEN+1];
 | 
			
		||||
static UINT8 cl_challengeattempted = 0;
 | 
			
		||||
static char cl_challengeaddress[64];
 | 
			
		||||
 | 
			
		||||
// Player name send/load
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -2275,6 +2276,8 @@ boolean CL_Responder(event_t *ev)
 | 
			
		|||
 | 
			
		||||
#ifndef NONET
 | 
			
		||||
		SL_ClearServerList(servernode);
 | 
			
		||||
		if (I_NetMakeNodewPort)
 | 
			
		||||
				servernode = I_NetMakeNode(cl_challengeaddress);
 | 
			
		||||
#endif
 | 
			
		||||
		cl_mode = CL_SEARCHING;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -3794,7 +3797,7 @@ static void HandleConnect(SINT8 node)
 | 
			
		|||
				D_MakeJoinPasswordChallenge(&netbuffer->u.joinchallenge.challengenum, netbuffer->u.joinchallenge.question);
 | 
			
		||||
 | 
			
		||||
				netbuffer->packettype = PT_JOINCHALLENGE;
 | 
			
		||||
				HSendPacket(node, true, 0, sizeof(joinchallenge_pak));
 | 
			
		||||
				HSendPacket(node, false, 0, sizeof(joinchallenge_pak));
 | 
			
		||||
				Net_CloseConnection(node);
 | 
			
		||||
 | 
			
		||||
				return;
 | 
			
		||||
| 
						 | 
				
			
			@ -4017,6 +4020,8 @@ static void HandlePacketFromAwayNode(SINT8 node)
 | 
			
		|||
				cl_challengenum = netbuffer->u.joinchallenge.challengenum;
 | 
			
		||||
				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
 | 
			
		||||
 | 
			
		||||
				cl_mode = CL_CHALLENGE;
 | 
			
		||||
| 
						 | 
				
			
			@ -4026,6 +4031,10 @@ static void HandlePacketFromAwayNode(SINT8 node)
 | 
			
		|||
					case 2:
 | 
			
		||||
						// We already sent a correct password, so throw it back up again.
 | 
			
		||||
						D_ComputeChallengeAnswer(cl_challengequestion, cl_challengepassword, cl_challengeanswer);
 | 
			
		||||
#ifndef NONET
 | 
			
		||||
						if (I_NetMakeNodewPort)
 | 
			
		||||
							servernode = I_NetMakeNode(cl_challengeaddress);
 | 
			
		||||
#endif
 | 
			
		||||
						cl_mode = CL_ASKJOIN;
 | 
			
		||||
						break;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										12
									
								
								src/d_net.c
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								src/d_net.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -781,6 +781,8 @@ static const char *packettypename[NUMPACKETTYPE] =
 | 
			
		|||
{
 | 
			
		||||
	"NOTHING",
 | 
			
		||||
	"SERVERCFG",
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	"CLIENTCMD",
 | 
			
		||||
	"CLIENTMIS",
 | 
			
		||||
	"CLIENT2CMD",
 | 
			
		||||
| 
						 | 
				
			
			@ -801,6 +803,9 @@ static const char *packettypename[NUMPACKETTYPE] =
 | 
			
		|||
	"RESYNCHEND",
 | 
			
		||||
	"RESYNCHGET",
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	"CLIENT3CMD",
 | 
			
		||||
	"CLIENT3MIS",
 | 
			
		||||
	"CLIENT4CMD",
 | 
			
		||||
| 
						 | 
				
			
			@ -811,13 +816,20 @@ static const char *packettypename[NUMPACKETTYPE] =
 | 
			
		|||
	"DOWNLOADFILESOKAY",
 | 
			
		||||
 | 
			
		||||
	"FILEFRAGMENT",
 | 
			
		||||
 | 
			
		||||
	"TEXTCMD",
 | 
			
		||||
	"TEXTCMD2",
 | 
			
		||||
	"TEXTCMD3",
 | 
			
		||||
	"TEXTCMD4",
 | 
			
		||||
 | 
			
		||||
	"CLIENTJOIN",
 | 
			
		||||
	"NODETIMEOUT",
 | 
			
		||||
	"RESYNCHING",
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	"TELLFILESNEEDED",
 | 
			
		||||
	"MOREFILESNEEDED",
 | 
			
		||||
 | 
			
		||||
	"PING"
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue