I have a bunch of Rules and some things require a bit more complex logic than usual. What I want to do is use a hook that runs when a particular rule fires, access the data that's passed in to it and manipulate it accordingly so when the rule executes it does it with the manipulated data. I looked through the Rules API and tried some of the function but none seem to have what I want. Is there such a function, or this there a better way?
A simple example: For a rule that sends an email, I want to hook in to it, check some stuff with code and then change the email address it sends to.