def process_unavailable_presence(self,stanza):
fr=stanza.get_from()<EOL>if not fr.resource:<EOL><INDENT>return<EOL><DEDENT>nick=fr.resource<EOL>user=self.users.get(nick)<EOL>if user:<EOL><INDENT>old_user=MucRoomUser(user)<EOL>user.update_presence(stanza)<EOL>self.handler.presence_changed(user,stanza)<EOL>if user.new_nick:<EOL><INDENT>mc=stanza.get_muc_child()<EOL>if isinstance(mc,MucUserX):<EOL><INDENT>renames=[i for i in mc.get_items() if isinstance(i,MucStatus) and i.code==<NUM_LIT>]<EOL>if renames:<EOL><INDENT>self.users[user.new_nick]=user<EOL>del self.users[nick]<EOL>return<EOL><DEDENT><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>old_user=None<EOL>user=MucRoomUser(stanza)<EOL>self.users[user.nick]=user<EOL>self.handler.presence_changed(user,stanza)<EOL><DEDENT>if fr==self.room_jid and self.joined:<EOL><INDENT>self.joined=False<EOL>self.handler.user_left(user,stanza)<EOL>self.manager.forget(self)<EOL>self.me=user<EOL><DEDENT>elif old_user:<EOL><INDENT>self.handler.user_left(user,stanza)<EOL><DEDENT>
Process <presence type="unavailable"/> received from the room.

:Parameters:
    - `stanza`: the stanza received.
:Types:
    - `stanza`: `MucPresence`