private void checkPresenceCode(
        Set<Status> statusCodes,
        boolean isUserModification,
        MUCUser mucUser,
        EntityFullJid from) {
        // Check if an occupant was kicked from the room
        if (statusCodes.contains(Status.KICKED_307)) {
            // Check if this occupant was kicked
            if (isUserModification) {
                // Reset occupant information.
                userHasLeft();

                for (UserStatusListener listener : userStatusListeners) {
                    listener.kicked(mucUser.getItem().getActor(), mucUser.getItem().getReason());
                }
            }
            else {
                for (ParticipantStatusListener listener : participantStatusListeners) {
                    listener.kicked(from, mucUser.getItem().getActor(), mucUser.getItem().getReason());
                }
            }
        }
        // A user was banned from the room
        if (statusCodes.contains(Status.BANNED_301)) {
            // Check if this occupant was banned
            if (isUserModification) {
                joined = false;
                for (UserStatusListener listener : userStatusListeners) {
                    listener.banned(mucUser.getItem().getActor(), mucUser.getItem().getReason());
                }

                // Reset occupant information.
                occupantsMap.clear();
                myRoomJid = null;
                userHasLeft();
            }
            else {
                for (ParticipantStatusListener listener : participantStatusListeners) {
                    listener.banned(from, mucUser.getItem().getActor(), mucUser.getItem().getReason());
                }
            }
        }
        // A user's membership was revoked from the room
        if (statusCodes.contains(Status.REMOVED_AFFIL_CHANGE_321)) {
            // Check if this occupant's membership was revoked
            if (isUserModification) {
                joined = false;
                for (UserStatusListener listener : userStatusListeners) {
                    listener.membershipRevoked();
                }

                // Reset occupant information.
                occupantsMap.clear();
                myRoomJid = null;
                userHasLeft();
            }
        }
        // A occupant has changed his nickname in the room
        if (statusCodes.contains(Status.NEW_NICKNAME_303)) {
            for (ParticipantStatusListener listener : participantStatusListeners) {
                listener.nicknameChanged(from, mucUser.getItem().getNick());
            }
        }
        // The room has been destroyed.
        if (mucUser.getDestroy() != null) {
            MultiUserChat alternateMUC = multiUserChatManager.getMultiUserChat(mucUser.getDestroy().getJid());
            for (UserStatusListener listener : userStatusListeners) {
                listener.roomDestroyed(alternateMUC, mucUser.getDestroy().getReason());
            }

            // Reset occupant information.
            occupantsMap.clear();
            myRoomJid = null;
            userHasLeft();
        }
    }
private void checkPresenceCode ( Set < Status > statusCodes , boolean isUserModification , MUCUser mucUser , EntityFullJid from ) { if ( statusCodes . contains ( Status . KICKED_307 ) ) { if ( isUserModification ) { userHasLeft ( ) ; for ( UserStatusListener listener : userStatusListeners ) { listener . kicked ( mucUser . getItem ( ) . getActor ( ) , mucUser . getItem ( ) . getReason ( ) ) ; } } else { for ( ParticipantStatusListener listener : participantStatusListeners ) { listener . kicked ( from , mucUser . getItem ( ) . getActor ( ) , mucUser . getItem ( ) . getReason ( ) ) ; } } } if ( statusCodes . contains ( Status . BANNED_301 ) ) { if ( isUserModification ) { joined = false ; for ( UserStatusListener listener : userStatusListeners ) { listener . banned ( mucUser . getItem ( ) . getActor ( ) , mucUser . getItem ( ) . getReason ( ) ) ; } occupantsMap . clear ( ) ; myRoomJid = null ; userHasLeft ( ) ; } else { for ( ParticipantStatusListener listener : participantStatusListeners ) { listener . banned ( from , mucUser . getItem ( ) . getActor ( ) , mucUser . getItem ( ) . getReason ( ) ) ; } } } if ( statusCodes . contains ( Status . REMOVED_AFFIL_CHANGE_321 ) ) { if ( isUserModification ) { joined = false ; for ( UserStatusListener listener : userStatusListeners ) { listener . membershipRevoked ( ) ; } occupantsMap . clear ( ) ; myRoomJid = null ; userHasLeft ( ) ; } } if ( statusCodes . contains ( Status . NEW_NICKNAME_303 ) ) { for ( ParticipantStatusListener listener : participantStatusListeners ) { listener . nicknameChanged ( from , mucUser . getItem ( ) . getNick ( ) ) ; } } if ( mucUser . getDestroy ( ) != null ) { MultiUserChat alternateMUC = multiUserChatManager . getMultiUserChat ( mucUser . getDestroy ( ) . getJid ( ) ) ; for ( UserStatusListener listener : userStatusListeners ) { listener . roomDestroyed ( alternateMUC , mucUser . getDestroy ( ) . getReason ( ) ) ; } occupantsMap . clear ( ) ; myRoomJid = null ; userHasLeft ( ) ; } }
Fires events according to the received presence code.

@param statusCodes
@param isUserModification
@param mucUser
@param from