 						var user:MUCUserExtension = aPresence.getAllExtensionsByNS(MUCUserExtension.NS)[0];
 						if (user.statusCode == 307) {
 							// User left as a result of a kick, so no need to dispatch a USER_DEPARTURE event as we already dispatched USER_KICKED
+							removeItemAt(i);
+							return;
+						}
+						else if (user.statusCode == 301) {
+							// User left as a result of a ban, so no need to dispatch a USER_DEPARTURE event as we already dispatched USER_BANNED
 							removeItemAt(i);
 							return;
 						}

	     * <code>Room.ADMIN_AFFILIATION</code>,
	     * <code>Room.OWNER_AFFILIATION</code>
	     * @param jids An array of JIDs to grant these permissions to
	     * @param callback The function to call once permission granting is complete
	     * @see #revoke
	     * @see #ban
	     */
	    public function grant(affiliation:String, jids:Array, callback:Function):void
	    {
	        var iq:IQ = new IQ(roomJID, IQ.SET_TYPE);
	        var owner:MUCOwnerExtension = new MUCOwnerExtension();
	
	        iq.callbackScope = this;
	        iq.callbackName = "finish_admin";
	        iq.callback = callback;
	
	        for (var i:int=0; i < jids.length; i++) {
	            owner.addItem(affiliation, null, null, jids[i], null, null);

	     * <code>RoomEvent.ADMIN_ERROR</code></p>
	     * 
	     * @param jids An array of JIDs to allow
	     * @see #grant
	     * @see #revoke
	     */
	    public function allow( jids:Array ):void
	    {
	        grant(Room.NO_AFFILIATION, jids);
	    }
	
	    /*
