Charlie Sheen was admonished by the judge in the war involving Bob and Max -- the twins at the center of the war between Charlie and Brooke Mueller -- if he opens his mouth again about the case, he's going to jail.
Here's the best part. We're told at one point the judge said, "Don't forget, I'm Italian!"
Sources connected with the case tell TMZ ... the judge issued a temporary restraining order against Charlie. The TRO re-instates the gag order, prohibiting them from talking about the case.
We're told the judge was upset with Charlie, who called the jurist a fatty and a douchebag on TMZ Live.
Under the TRO ... we're told Charlie is prohibited from going within 200 yards of Brooke. He's also not allowed to contact Brooke. To that we're told Charlie told the judge, "Thank you."
Brooke, who was in court as well, had her lawyers ask the judge to suspend his visitation rights with the twins, but the judge rejected her request. Sources tell us Brooke wants Denise Richards REMOVED as temporary guardian of the twins, but that didn't happen.
By the way ... Brooke's lawyer made a big deal about the pic of the birthday cake for Brooke with a grenade on top ... but the judge didn't make a big deal of it.