The man convicted of stalking actress Miranda Cosgrove has now been ordered to stay off social media for at least a year after it was discovered he had been contacting friends of the former "iCarly" star trying to find out information about her.

According to TMZ, a judge has warned Joshua Stockton that one more misstep will almost certainly result in him being required to serve out a four-year prison term.

Currently, Stockton is being held at a psych hospital, where he was recently granted a week-long furlough for good behavior. It's then that he reportedly "jumped on the computer and started contacting Miranda's friends."

The website adds after being informed of Stockton's actions Cosgrove immediately contacted authorities with the news.

Back in October, Stockton was ordered to stay at least 100 yards away from Cosgrove for the next three years and not to contact anyone for the purpose of harassing her. He has previously threatened to electrocute himself as an expression of his love for the former Nickelodeon star.

During one of his past court appearances, Stockton showed up wearing a big, black fur coat and a white bandanna. He also appeared to be disoriented and when the judge asked his age was forced to check his driver's license.

Cosgrove has previously claimed Stockton "stalks her wherever she goes" and once sent her alarming messages where he threatened suicide and displayed pictures of a slit wrist.

The 22-year-old actress, who is slated to star in the NBC comedy "Crowded" this fall, also told the court she fears Stockton is "not living in the real world" ... and is not only a danger to himself but to her as well.

"Crowded" also stars Carrie Preston and Patrick Warburton.