Please delete your other post, you don't need 2 about the same thing...EDIT: nm, you can't now someone replied...
$chan is returning null because nickchanges aren't a channel event.To echo it in all channels you are in with $newnick use $comchan in a loop.
Also you don't need halt and haltdef. Since it is at the end of your event, you can use either.
Finally I don't know what the 4 was there for, so I left where it was. Swop it with $ifmatch to make the text red, which I'm guessing is what you wanted to do.
on ^*:NICK:{
var %c = 1
while ( $comchan($newnick,%c) != $null ) {
echo $ifmatch 4 $newnick was previously known as $nick
inc %c
}
haltdef
}