A judge in the Delaware Court of Chancery ruled Monday in favor of Los Angeles-based American Apparel in its request for a temporary restraining order against its former chief executive officer and founder Dov Charney.

The order bars Charney from attempts to remove members of the American Apparel board of directors or from making disparaging remarks about the company or any of its employees — past or present — to the press or in any other public forum, according to court documents.

The judge’s decision was based upon a 2014 standstill agreement between Charney, the company and New York hedge fund Standard General, the latter of which Charney had at one time hoped to work with to regain control of American Apparel.

Charney was fired from the company late last year and since then has made numerous attempts to get back into the top spot in a public showdown that has included rallies outside headquarters and litigation.

The restraining order is tied to a lawsuit American Apparel filed against Charney last month that alleged his breach of the standstill agreement in an attempt to launch what it called in court documents a “scorched-earth campaign against the company.”

The judge’s order comes ahead of American Apparel’s scheduled annual shareholders’ meeting July 16, which appears to be headed for a proxy battle.

Shareholder Jeffrey Kolb is pushing for the nomination of Adrian Kowalewski, former American Apparel chief financial officer and director, and Gene Montesano, who had earlier been considered for the board.

American Apparel pushed back in a filing with the Securities & Exchange Commission Friday that said it’s urging shareholders to elect a different slate of nominees in Laura Lee, Thomas Sullivan and Lyndon Lea.