Is it possible that a curse be constructed to lift when the target stops hurting others

I posted it a while ago:

It’s a two-parter (I really wanted to make that bastard suffer), but tying up his libido is in there.