Perhaps "tokenise" can help? You would have to trust that the data is coming in a consistent form, whichever way you do it.
Partial script:
on 1:NOTICE:XXXXXXXXX*:?:{
tokenise asc(') $2-
var1 = $1
var2 = $2 etc
Note the restart from $1 after tokenising
Not tested, as I am not on mIRC, and "tokenise" is probably "tokenize", but "help" is your friend! Cheers,
DK