Judges will also be able to remove prison privileges for almost three months, with visits from prisoners’ children exempt.