| Re: does Dragonade have the bandwidth detection thing? [message #492232 is a reply to message #492208] | 
			Mon, 17 April 2017 21:35    | 
		 
		
			
				
				
				  | 
					
						  
						Gen_Blacky
						 Messages: 3250 Registered: September 2006 
						
	Karma: 
 
					 | 
					General (3 Stars)  | 
					 | 
		 
		 
	 | 
 
	
		I have it in a da plugin. Without it players can abuse sbbo. I think it was just forgotten about.  
 
Toggle Spoiler
void Functions::CheckBW() 
{
	StringClass str;
	int BW = 0;
	int ID;
	for (SLNode<cPlayer>* PlayerIter = Get_Player_List()->Head(); (PlayerIter != NULL); PlayerIter = PlayerIter->Next())
	{
		cPlayer *p = PlayerIter->Data();
		ID = p->Get_Id();
		if (p->IsActive && Get_GameObj(ID)) 
		{
			BW = Get_Bandwidth(ID);
			int TheBW = PData[ID]->Bandwith;
			if (BandwidthDefualt > 0) {
				TheBW = BandwidthDefualt;
			}
			if (BW < TheBW) 
			{
				Console_InputF("setbw %d %d", ID, TheBW);
				DA::Page_Player(ID,"Your bandwidth has dropped below the allowed amount. It has been reset." );
				str.Format("Player %ls's bandwidth dropped below %d. Their bandwidth has been reset from %d", p->Get_Name(), TheBW, BW);
				SSGMGameLog::Log_Message(str,"_ALERT");
			}
		}
	}
} 
   
 
Every 30 seconds check the players is how its setup.  
 
I was thinking about making a new system to include Set_Net_Update_Rate_Player 
 
Unless someone can say why not to. 
		
		
 
   
		[Updated on: Mon, 17 April 2017 21:37] Report message to a moderator  
 |  
	| 
		
	 | 
 
 
 |