$
xnick identifiers won't really be much use for RAWMODE events. Firstly because they're only available for a few common modes, the 'rarer' modes won't have the identifiers, yet it's those modes which people are most likely to be looking to capture from RAWMODE since for the common ones they'd most likely use the specific event (OP, DEOP, VOICE, etc.). Secondly, any number of mode changes can be set on any given mode in a RAWMODE event, for instance what would $vnick return for the mode
+vv-vv n1 n2 n3 n4?
I think a better way is for RAWMODE to have an identifier that has parsed the mode line and returns information about each mode change (it's sign, character, and parameter if it takes one). I
suggested something like this already a while back.
If you're looking for a working scripted version, I posted one a few months ago
here.
Hmmm... linking to two of my own posts in the same post, eegads I'm becoming a spammer ;P.