Firefighters accept three-year deal