Irony

What does the this mean when someone says it to another perIronyson... Don't do anything that I wouldn't do?

It means "Behave yourself." The doings that the listener is to avoid are unspecified bad actions. Sometimes it's said ironically. ~rb

Isn't it usually said ironically? Pamela

My experience with it isn't broad enough to say. It may be said without irony in old writings. ~rb

No irony at all.
I heard that phrase a lot growing up in the NYC area in the 50s and 60s.
Most of the time it was just a way of saying "take it easy".
My father amplified it a bit by saying "Don't do anything you can't take a picture of".

I think it's a little under-ironic to be called irony. I'd rather call it attempted humor, like the valedictory, "Be good. And if you can't be good, be careful."
SS