'We stove away the character when the player goes ooc/logs off,
otherwise the character object will remain in the room also
after the player logged off ("headless", so to say).
Args:
player (Player): The player object that just disconnected
from this object.
session (Session): Session controlling the connection that
just disconnected.'

def at_post_unpuppet(self, player, session=None):

    if (not self.sessions.count()):
        if self.location:
            def message(obj, from_obj):
                obj.msg(('%s    has    left    the    game.' % self.get_display_name(obj)), from_obj=from_obj)
            self.location.for_contents(message, exclude=[self], from_obj=self)
            self.db.prelogout_location = self.location
            self.location = None
