The days of Hollywood power brokers shelling out hush money to silence accusations of serious sex crimes are over in California.

Since 2006, it has been illegal in California to settle “any civil action” claiming a “felony sex offense” with a non-disclosure agreement requiring the accuser to keep quiet about the “factual information” of the claim. In January of this year, the law was expanded to ban NDAs in civil settlements of claims for “childhood sex abuse.”

That means that Hollywood celebrities now accused of serious sex crimes cannot use secret settlement agreements to stop their accusers from talking to the police or the press, as Harvey Weinstein accuser Rose McGowan has accused him of doing in the past.

Also Read: Harvey Weinstein Under New Lewd Conduct Investigation by LAPD

“Attorneys have to tread carefully in these confidentiality provisions, because if they don’t, they could open themselves up to professional discipline and in some cases criminal prosecution,” Devin McRae, a Los Angeles entertainment attorney who has worked on a variety of non-disclosure agreements, told TheWrap.

“I saw a case where the agreements were basically, ‘so and so won’t talk,’ and the attorneys were indicted for obstruction of justice charges,” McRae said.

The “felony sex offense” covered by the law includes rape and forced oral copulation, Richard Zitrin, who teaches legal ethics at University of California at Hastings law school and has advised lawmakers on the law, told TheWrap. Rape includes “sexual intercourse” by force, duress, by use of “intoxicating” substances or drugs to render a person unable to resist, or sexual intercourse with an unconscious person.

Also Read: Julianna Margulies Details 'Horrific' Encounter With Steven Seagal in Hotel Room: 'I Saw His Gun'

“Childhood sex abuse” includes both felony and misdemeanor child sex crimes, including pimping minors under the age of 16 for sex, sodomy or lewd and lascivious acts with minors under the age of 14, oral copulation with a minor under the age of 18, sexual penetration of a minor under the age of 18.

Also Read: Amazon Launches Jeffrey Tambor Investigation Amid Sexual Harassment Accusations

Starting this year, lawyers could face discipline by the California State Bar for “demanding” or “advising” their clients to sign agreements settling claims alleging felony sex crimes and child sex crimes with non-disclosure agreements, or NDAs. Any settlement reached after January 1, 2017 in violation of the law is “void.”

Deborah L. Rhode, professor of legal ethics and director Center on the Legal Profession at Stanford Law School, told TheWrap that the law is “better than nothing” but “isn’t broad enough.”

“It doesn’t cover what’s come out in recent days about related patterns of abusive conduct,” she said.

Rhode said she’s unaware of any efforts to enforce the law. The Bar did not respond to TheWrap’s request for information on any enforcement of the law.

The 2006 version of the law was authored by then-Assembly member Frances Pavley after the Catholic Church settled a nationwide flood of sex abuse lawsuits against priests — and required the victims to remain silent.

Also Read: Twitter Apologizes for 'Bisexual' Search Glitch, Promises Fix

The California anti-secrecy law probably does not apply to any of the Harvey Weinstein settlements reported by the New York Times, even though McGowan has come forward to accuse him of rape since his 1997 settlement with the actress. The Financial Times said he paid a secret settlement to an unnamed Miramax employee in 1998 involving a claim of sexual assault.

But those reported settlements would have been reached before the 2006 California law took effect, and the 2015 settlement involved a non-criminal sexual harassment allegation. Weinstein’s lawyer told the Times that his client made no admission of wrongdoing in his past settlements.

Weinstein is now being investigated by the LAPD on accusations that he dragged an actress by the hair and raped her in Mr. C’s Beverly Hills hotel in 2013, and accusations of lewd conduct in 2015. Weinstein has denied all claims of sexual assault in a statement that says, “Mr. Weinstein unequivocally denies any allegations of nonconsensual sex.”

The California legislature is exploring expanding the law to cover sexual harassment settlements after recent reports that Weinstein, former Fox News host Bill O’Reilly and chief Roger Ailes paid secret settlements to accusers claiming sex harassment.

California Sen. Connie M. Leyva of Chino announced that she will introduce legislation next year to expand the anti-secrecy ban to cover settlements of claims of sexual harassment, sex discrimination, and sexual assault.

“The reason that this bill is important now is because it’s not just a matter about a felony, it’s about harm,” UC Hastings law school lecturer Zitrin said.

New York and New Jersey lawmakers also announced they will introduce legislation to ban non-disclosure agreements that cover up sexual harassment claims.