You can use the /cnick command for this:
E.g.
on *:TEXT:*has been promoted to*:#chan:{
if (($nick == user1) && ($1 ison $chan)) {
if ($7 == major(4)) .cnick -a $v1 4
elseif ($7 == major(5)) .cnick -a $v1 5
}
}This checks if the nick saying it is user1 and if the nickname he supplied is currently on the channel. It then looks at what the new rank is and changes the nick color in the address book (where 4 is red, 5 is brown, etc.).
Don't forget to also change #chan in the on TEXT event.