on 1:quit:{
set %quitmessage $1-
echo -a %quitmessage
}

on 1:nick:{
set %nnick $nick
set %nenick $newnick
echo -a %%nnick to %nenick
}
Hope this help. I'm not sure with the ON correct or not, but the rest is correct.