import voxo.server.services.NetworkService;
public class SendContactListAction {
public SendContactListAction(User u) throws UnknownHostException, IOException, SQLException {
if (u.getOnline() && (u.getIp() != null)) {
ContactListPacket clp = new ContactListPacket(UserManager.getUserContactsByUser(u), UserManager.getUserContactRequestsByUser(u));
NetworkService.sendPacket(u.getIp(), new Packet(EnumPacket.SERVER_UpdateContact, clp));
}
}