Carly Rae Jepsen's online stalker has avoided jail time after an Abbotsford Provincial Court judge handed him a four-month conditional sentence.

Christopher Long will be restricted to travel between work, home and school, and will also be subject to electronic monitoring after he pleaded guilty to charges including mischief, and data and identity fraud after hacking the singer's email and social media accounts, CTV News reported.

Long is not allowed to attend any of Jepsen's concerts, nor have any contact with her or her ex-boyfriend, and cannot use a computer for anything except work and school during the sentence, said CBC News.

Jordi Ashworth, Jepsen's boyfriend at the time of the hacking, told the network before the sentencing that Long should get jail time.

On Sept. 6, the court heard that Long's stalking activity began as a prank after he found one of Jepsen's old email addresses through Facebook and used it to post vulgar content on her social media accounts.

Ashworth, who attended the hearing that day, called the experience "scary," adding that, "we didn’t know what this guy was trying to do or what information he was going after.”

The Crown asked for a sentence of four months' house arrest but the defence asked the court to consider a conditional discharge.

Also on HuffPost:

Loading Slideshow...
  • August 2012

    (Getty photo)

  • August 2012

    (Getty photo)

  • August 2012

    (Getty photo)

  • July 2012

    (Getty photo)

  • July 2012

    (Getty photo)

  • July 2012

    (Getty photo)

  • June 2012

    (Getty photo)

  • June 2012

    (Getty photo)

  • June 2012

    (Getty photo)

  • May 2012

    (Getty photo)

  • May 2012

    (Getty photo)

  • May 2012

    (Redferns photo)

  • May 2012

    (Getty photo)

  • April 2012

    (WireImage photo)

  • April 2012

    (Getty photo)

  • April 2012

    (Getty photo)

  • March 2012

    (WireImage photo)

  • March 2012

    (Getty photo)

  • October 2010

    (WireImage photo)

  • Justin Bieber Beat By Protege Carly Rae Jepsen