From the NannyMUD documentation
2001-08-12
NAME
exit - Call when a living object leaves a room.LOCATION
Any room object can define this function.SYNTAX
void exit(object ob);DESCRIPTION
This function is called in the old environment every time a living object leaves it. That object is passed to the function as an argument.NOTE
*** BE EXTREMELY CAREFUL WITH THIS *** A bug in this object can mean that anyone entering the room is trapped forever (that is, until the next reboot). If the object leaves by move_object() or transfer(), then this_player will be that object. But if it leaves by destruct(), then this_player will not be the destructed object. Thus it is better to use the argument passed to exit rather than this_player().SEE ALSO
init in lfun/basic/init