I use a system called time out for managing behavior as well as for students who constantly request to go to the bathroom or their lockers during class time. I will ask the student is it worth 5 minutes of their lunch time to go to the bathroom or lockers. If the answer is Yes, I allow them to go, but at lunch time they have to come to me for lunch detention for 5 minutes. To ensure they don't forget, I send notes to the teacher that they go to during the lunch period. They are always glad to remind them. I apply the same principle for misconduct in class. Each misbehavior gets 5 minutes of their lunch time. It usually only takes a student missing five minutes of their lunch a couple of times before they get the idea.