He better prep himself for a prison beatdown!

Mark Salling has plead guilty to child pornography charges, after his arrest last December for possessing over 50,000 photos of prepubescent girls on his computer. The Glee star was facing over 20 years in jail, but with the plea agreement, he only has to serve four to seven years in the slammer.

In addition, he has to pay $50K-a-piece in restitution to the victims, and he has to register as a sex offender and participate in a sex offender treatment program.

He is no longer permitted to communicate in any way with anyone under the age of 18, unless a guardian is present, and he can't be around schools, public pools, playgrounds, or basically anywhere a pedophile would enjoy. He will also be under 20 years of court supervision.

He can kiss his acting career and dating life goodbye!