Charlie Sheen just learned a cool lesson -- you can call a judge in your custody war an "anus brain" and get away with it, even with a gag order ... and that's exactly what just happened.
We've learned the judge in the DCFS case called all the lawyers in this afternoon for an emergency meeting. Sources connected with Brooke Mueller tell TMZ ... the judge wanted to have a chit chat about Charlie's latest Twitter rant and his appearances on TMZ Live.
You'll recall Charlie exploded on Twitter Friday, calling the folks at Child Services "lascivious and incompetent." Sheen then directed his ire at the judge, calling him "Mr. I'm Italian judge anus-brain."
And Charlie went on "TMZ Live" a couple weeks ago and blasted Brooke, calling her an evil whore who's endangering their children.
Our sources say the judge decided it would NOT be in anyone's best interest to hold a contempt hearing, for fear it would turn into a "circus." So we're told Charlie's lawyer promised his client would muzzle himself and be a good boy. And that was good enough for the judge.