package voxo.server.actions;
import java.io.IOException;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.sql.SQLException;
import java.util.ArrayList;
import voxo.common.entities.Packet;
import voxo.common.entities.User;
import voxo.common.enums.EnumPacket;
import voxo.server.managers.UserManager;
import voxo.server.services.NetworkService;
public class ClientSearchRequestAction {
public ClientSearchRequestAction(InetAddress ip, String o) throws UnknownHostException, IOException, SQLException {
// Get the search results
ArrayList<User> alu = UserManager.searchByUsername(o);
// Send results
NetworkService.sendPacket(ip, new Packet(EnumPacket.SERVER_SearchResults, alu));
}
}