/ns info $nick

on 1:notice:*quit*:?:
then you could echo it or maybe set it to a variable and use the variable in your existing script ?
or something of the sort that would get you the quit msg even if you were not on the same channel