The 'Anger Management' star, who is embroiled in a bitter custody battle with his ex-wife over their four-year-old twins, Bob and Max, had a temporary restraining order issued against him and was also ordered to stop discussing the case outside court by a judge in Los Angeles on Wednesday.
A source told gossip website TMZ.com that the actor replied, "Thank You," after being told he cannot go within 200 yards of Brooke, 36, or contact her.
The judge also re-instated a gagging order, blocking the actor, Brooke, and Denise Richards, who has been caring for the boys since Brooke when to rehab in May, from talking about the case.
The 48-year-old actor wasn't punished for previously blasting the Department of Children and Family Services (DCFS) for allegedly being more concerned about Brooke and her sobriety than the welfare of their children.
The judge also rejected a request by Brooke and her lawyers to suspend Charlie's visitation rights with the twins.
The former 'Two And A Half Men' star previously vowed not to let anything stop him from protecting his children.
He said: "What my family and I are forced to deal with in the last four years, lives outside the pale of any acceptable conduct or decency. I am battling an amorphous enemy that needs to be swiftly dis-empowered.
"There is no force, no human, and no scenario in the known universe that will divert my course, my mission in this life."
Charlie's rant came after his other ex-wife Denise wrote a distressing letter to the DCFS to inform them she could no longer care for Bob and Max due to their behavior towards her pets and her own daughters with Charlie, Sam, nine, and Lola, eight, and her adopted little girl, Eloise, two.