Look at /signal command and the ON SIGNAL event.