refactor the way external privmsg's are handled