Here is a very small proposal , it's goal is to add two events that only trigger if owned by the estate owner.
sim_connected(integer num_detected)
{
}
sim_disconnected(integer num_detected)
{
}
these two events, simmilar to a sensor are called each time an avatar connect or disconnect from the sim, with all the detected function set that sensors use.