LOS ANGELES (CBSLA.com) — An ordinance allowing the city to offer rewards in “swatting” pranks was approved Wednesday by the Los Angeles City Council.

Swatting pranks – defined in the legislation as a “malicious prank that causes a law enforcement emergency response to a location where no crime is occurring” – first focused on celebrities like Rihanna, Justin Timberlake and Selena Gomez. In recent months, members of the council and other lawmakers also became targets of swatting.

READ MORE: Tejon Ranch Will Be A Zero-Emissions Home Development, Ending Decades-Long Legal Battle

City officials were already authorized to offer rewards for crimes that result in “economic injuries” suffered through “unnecessary emergency response.” The law approved Wednesday makes it clear that “swatting” is included among those crimes.

The ordinance was proposed by City Councilman Paul Koretz, who was subsequently targeted and twice had his home swarmed with law enforcement officers based on false reports.

“This is an aggressive group of people, and I do think we need to respond to this kind of thing,” Koretz said. “Something will eventually go wrong if we don’t nip this practice in the bud.”

Koretz said he was getting into the shower on April 10 when several police officers arrived at his apartment with guns drawn. The officers were responding to a shots fired report at the address, identified as the home of former Laker Magic Johnson.

READ MORE: Parolee Aariel Maynor Arrested In Connection With Jacqueline Avant Killing After Shooting Himself In The Foot

Koretz said he held up his City Council identification badge and apologized to the officers, saying he wasn’t “letting you in while I’m naked,” and was able to persuade police to let him get dressed before letting them in.

Two days later, police responded to Koretz’s home again, this time on a bogus report that hostages were being held in a closet.

Sen. Ted Lieu, D-Redondo Beach, introduced “anti-swatting” state legislation earlier this year. Lieu was then also targeted by pranksters in April.

Lieu’s wife was ordered out of the home by police, who received a text claiming Lieu had shot his wife. Lieu was not home at the time and was initially shaken when he learned there was a report that his wife had been shot.

The vote to approve the ordinance was unanimous last week, but there was not enough council members present at the time to pass the legislation outright.

MORE NEWS: NFL Week 13 AFC East Preview: CBS Boston's Levan Reid Calls AFC East Title Fight A Battle Of 'Big Brother Vs Little Brother'

(©2013 CBS Local Media, a division of CBS Radio Inc. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. Wire services contributed to this report.)