Adds reason support for kicks and bans to the client.
This commit is contained in:
		
							parent
							
								
									462ece38c7
								
							
						
					
					
						commit
						2ba3e86a1d
					
				@ -539,25 +539,23 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
  else if (header == "KK")
 | 
					  else if (header == "KK")
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    if (courtroom_constructed && f_contents.size() > 0)
 | 
					    if (courtroom_constructed && f_contents.size() >= 1)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      int f_cid = w_courtroom->get_cid();
 | 
					      call_notice("You have been kicked from the server.\nReason: " + f_contents.at(0));
 | 
				
			||||||
      int remote_cid = f_contents.at(0).toInt();
 | 
					      construct_lobby();
 | 
				
			||||||
 | 
					      destruct_courtroom();
 | 
				
			||||||
      if (f_cid != remote_cid && remote_cid != -1)
 | 
					    }
 | 
				
			||||||
        goto end;
 | 
					  }
 | 
				
			||||||
 | 
					  else if (header == "KB")
 | 
				
			||||||
      call_notice("You have been kicked.");
 | 
					  {
 | 
				
			||||||
 | 
					    if (courtroom_constructed && f_contents.size() >= 1)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      call_notice("You have been banned from the server.\nReason: " + f_contents.at(0));
 | 
				
			||||||
      construct_lobby();
 | 
					      construct_lobby();
 | 
				
			||||||
      destruct_courtroom();
 | 
					      destruct_courtroom();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  else if (header == "KB")
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    if (courtroom_constructed && f_contents.size() > 0)
 | 
					 | 
				
			||||||
      w_courtroom->set_ban(f_contents.at(0).toInt());
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  else if (header == "BD")
 | 
					  else if (header == "BD")
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    call_notice("You are banned on this server.");
 | 
					    call_notice("You are banned on this server.");
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user