Landlords will have to investigate emergency hazards and make them safe within 24 hours under new rules