add defining an event based on a line's content or a message's content