This is refreshing … Tila Tequila just convinced a judge someone was harassing her, because she just won a restraining order against a photog who claimed Tila kidnapped his alleged girlfriend.

According to docs filed today in L.A. County Superior Court, Tila wanted Garry Sun ordered to stay 100 yards away from her … but the judge said 10 yards would do. That’s funny on so many levels.

As we first reported yesterday, Garry filed an application for a restraining against Tila — claiming she kidnapped his so-called girlfriend Shyla Jennings on October 19 and then threatened to kill him.

Shyla has since told us Garry’s claims are totally BS … and that she has “no idea who Garry Sun is.”

UPDATE: Tila tells TMZ she’s also preparing to file a lawsuit against Sun for “making such crazy allegations about me.”