A 23-year-old British Columbia man who pleaded guilty to carrying a loaded handgun inside a crowded nightclub has been sentenced to two-and-a-half years in prison.