/help Raw events

This will trap all raw events, followed by the normal display created by them. Once you figure out which one you want, the numeric can replace the 1st asterisk. Note that raw events are slightly different in that their $1- is populated a little differently than TEXT or NOTICE, so expect $1 to be your current nick. The raw text string will also be different than the normal string displayed, so you can't always assume what the raw string will be simply by looking at the status window message you otherwise see.

Code
raw *:*:{ echo 5 -s raw event $numeric -> $1- }