Great - thanks for the help. First off, since PEP relies on CAPS, I'm implementing CAPS first. My first question regarding CAPS is what is the best way for my extension to listen for incoming IQ events. I couldn't find an example in the existing extensions. In the case of CAPS, it wouldn't be through registering a callback, since it's not purely request/response. That is, a CAPS request could come in as an IQ event:
<query xmlns='<a href="http://jabber.org/protocol/disco#info'/">http://jabber.org/protocol/disco#info'/>
So, what is the recommended way to listen for such an event.