Inappropriate comments

When kids in your classes say sexual stuff, how do you handle it? It's not a private comment whispered to each other, but comments to the whole class.

Two examples: taking attendance and a kid was gone. A boy yelled "he's in the locker room jacking off!" (High school)

Or in a class where the teacher has name sticks, a kid yelled "Are you gonna pull my stick again?" (Jr high)

🤢

Just looking for ideas to shut that stuff down immediately.