Musician Chris Brown has been ordered to return to rehab for three months to deal with anger management issues.
Los Angeles Superior Court Judge James Brandlin also said he must do at least 24 hours of community service a week and be tested for drugs.
The singer agreed to the terms, which were suggested by probation officers overseeing his sentence for beating his ex-girlfriend Rihanna in 2009.
He left rehab earlier this month after throwing a rock through a window.
After a joint counselling session with his mother on 10 November, where she suggested he needed to remain in treatment, Brown threw the stone through the window of her car.
Brown was kicked out of the rehab centre because he had signed a contract agreeing to refrain from violence while in treatment.
He had gone to the facility voluntarily on 29 October having been arrested in Washington DC days earlier. A man accused Brown of punching him after he tried to get in a photo with the singer.
The event could still be considered a probation violation and result in further punishment for the singer. He is due to appear in court in Washington DC on Monday.
Judge Brandlin ordered probation officers to get more information on the arrest in Washington for a hearing on 16 December.
He also said Brown's focus should be on his treatment and community service, where he will have to do tasks like litter picking or cleaning graffiti.
In Brown's probation report it says the singer has said he wants treatment for his anger management issues.
He said he was depressed after being ordered to re-do 1,000 hours of community service earlier this year after a hit-and-run incident.
The 24-year-old has performed 20 hours so far, according to the report. An officer said the singer wouldn't complete his assignment if Brown was not required to perform at least 25 hours of work per week.
Brown appeared in court on Wednesday with his girlfriend Karrueche Tran and only spoke once to acknowledge he agreed to the terms given by the judge.
His mother, who has been to many of her son's court hearings, was not there.
Brown's lawyer, Mark Geragos, asked that the musician was also ordered to take any medications his doctor prescribed.
Follow @BBCNewsbeat on Twitter