I imagine this would happen in the control-npc's script, something like:
if (actionplayeronline){
for (i=0;i<allplayerscount;i++){
with (allplayers[i]){
if (strcontains(#s(client.buddies),#s(this.account))) {
insertstring client.msg,0,#s(this.account) has logged in;
}
}
}
}
something like that or w/e, i'm half awake and have a headache, so no comments on it

...
It wouldnt show for RC's either, and it'd be laggy as hell, but w/e o.0
Also some variations for the conditions...