Weapon plea brings 10-year prison term