#NEWLINE# def _getRoomUser( self , stanza ) : #NEWLINE# #INDENT# "\n        Lookup the room and user associated with the stanza's sender.\n        " #NEWLINE# occupantJID = stanza . sender #NEWLINE# if ( not occupantJID ) : #NEWLINE# #INDENT# return ( None , None ) #NEWLINE# #UNINDENT# room = self . _getRoom ( occupantJID . userhostJID ( ) ) #NEWLINE# if ( room is None ) : #NEWLINE# #INDENT# return ( None , None ) #NEWLINE# #UNINDENT# nick = occupantJID . resource #NEWLINE# user = room . getUser ( nick ) #NEWLINE# return ( room , user )