relay: add base code for being fully CTCP compliant