Put the legit event code into a function, still needs to catch cIDs we don't have.