Four members of an organised crime group have pleaded guilty after detectives uncovered a class A cocaine operation that was being directed from inside a prison cell.