Does the notice contain the channel name that it came from? If so then picking it apart and echoing to that channel should be simple. Otherwise you'd have to keep a temporary list of channels you've recently joined and consider the order of the notices received to determine which it came from