Man sentenced to prison in weapons case