A judge has ordered a Philadelphia rapper to attend etiquette classes and notify his probation officer before taking any trips outside of the commonwealth.

The Philadelphia Inquirer says Common Pleas Court Judge Genece Brinkley on Friday gave Meek Mill, whose real name is Robert Williams, an Aug. 4 deadline to complete the classes.

The orders came at a probation violation hearing for Williams, who is on probation for a 2008 gun and drug conviction for which he was sentenced to 11 to 23 months in prison.

Prosecutors say his statements on social media have been followed by threats to his probation officer from supporters.

The judge said Williams needed etiquette classes to refine his use of social media and to help him explain his business to the court.