Plea brings eight-year sentence in fatal shooting