public List<Presence> addModerator(@Nonnull final JID targetUserAddress, @Nonnull final Affiliation actorAffiliation) throws ForbiddenException
    {
        if (Affiliation.admin != actorAffiliation&& Affiliation.owner != actorAffiliation) {
            throw new ForbiddenException();
        }
        // Update the presence with the new role and inform all occupants
        return applyRoleChange(targetUserAddress, Role.moderator);
    }
Changes the role of the user within the room to moderator. A moderator is allowed to kick
occupants as well as granting/revoking voice from occupants.

@param targetUserAddress the (real) JID of the occupant to give moderator privileges.
@param actorAffiliation The room affiliation of the user that is granting moderator privileges to an occupant.
@return the list of updated presences of all the client resources that the occupant has used to join the room.
@throws ForbiddenException If the user is not allowed to grant moderator privileges.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/MUCRoom.java