public void partRoom(String message, String currentname, Socket socket){
	int arrsize;
	int num;
	String roomname;
	room = message.substring(6);
	if(roomlist.containsKey(room)){
	    roomnum = Integer.parseInt((roomlist.get(room)).toString());
	    //Removes the user from the channel
	    if((rooms.get(roomnum-1)).containsKey(currentname)){
		(rooms.get(roomnum-1)).remove(currentname);
		(userroomlist.get(currentname)).remove((userroomlist.get(currentname)).indexOf(room));

		//Remove room if it is empty
		if((rooms.get(roomnum-1)).size() == 0){
		    rooms.remove(roomnum-1);
		    roomlist.remove(room);
		    temptable.remove(roomnum);

		    //Reindex the rooms
		    Enumeration keys = roomlist.keys();
		    while(keys.hasMoreElements()){
			String currkey = (String)keys.nextElement();
			if((int)roomlist.get(currkey) >= roomnum+1){
			    int save = (int)roomlist.get(currkey);
			    roomlist.remove(currkey);
			    roomlist.put(currkey, save-1);
			} 
		    }
		}
		else{
		    //Notifies others the user has left
		    sendToChannel("/parted " + currentname + " has parted the channel " + room + "." , roomnum, currentname, socket, room);
		    sendListChannel(roomnum, "tempcheck", socket, room);
		}
	    }
	    //The user is not in the channel
	    else{
		try{
		    DataOutputStream dout2 = new DataOutputStream(socket.getOutputStream());
		    dout2.writeUTF("You are not in the channel " + room + ". You cannot leave a channel you are not in.");
		} catch(IOException ie) {
		    System.out.println(ie);
		}
	    }
	}
	//The room does not exist
	else{
	    try{
		DataOutputStream dout = new DataOutputStream(socket.getOutputStream());
		dout.writeUTF("The channel " + room + " does not exist. You cannot leave a channel that does not exist.");
	    } catch(IOException ie) {
		System.out.println(ie);
	    }
	}
    }