Martin Ridehalgh admitted dealing dealing crack cocaine and heroin at court.