Automatic fire-fighting system