The attacker of Paris Hilton's boyfriend Cy Waits has been sentenced to 227 days in jail.

James Rainford pleaded guilty to misdemeanor battery in a Los Angeles courthouse today (28.04.11) and was instantly given the sentence, according to Boston.com.

Prosecution spokesman Frank Matejan said that James - who punched Cy at the back of his head and tried to grab his neck yesterday (27.04.11) - was also given three years of informal probation and ordered to stay away from the nightclub owner.

James has been arrested before for trespassing on Paris' property in October 2010.

He approached the socialite and her boyfriend as they made their way to court so Paris could testify against Nathan Parada, who is alleged to have tried to break into her property wielding a knife in August 2010.

After attacking Cy, James was taken into police custody, and later claimed he had only been trying to get an autograph from Paris and to ask her father, Rick, for permission to ask her to marry him - although he has a restraining order that requires he stays at least 200 yards away from the blonde heiress.

Yesterday (27.04.11) the 30-year-old star tweeted her mother Kathy Hilton about the incident, referring to James as a "psycho".

She wrote: "Omg @KathyHilton! That other psycho intruder just punched Cy in the back of the head as we were walking into the court house. So scary! :( (sic)"