public ChannelMenu(String host, String pass, String nick, String user, String real) throws IOException {
		super(host);
		main = new IRCMain(host, new int[] {1024, 2048, 6667, 6669} , pass, nick, user, real);
		main.addIRCEventListener(internalList);
		//main.addIRCEventListener(new IRCLocalListener());
		setBounds(100, 100, 450, 540);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		getContentPane().setLayout(new GridLayout(1, 1, 0, 0));

		JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		getContentPane().add(tabbedPane);

		Panel joinChannel = new Panel();
		tabbedPane.addTab("Join", null, joinChannel, null);
		joinChannel.setLayout(null);

		list = new List();
		list.setMultipleMode(true);
		list.setBounds(10, 10, 409, 212);
		joinChannel.add(list);

		txtPleaseWaitConnecting = new JTextField();
		txtPleaseWaitConnecting.setText("Please wait, connecting...");
		txtPleaseWaitConnecting.setBounds(10, 228, 409, 37);
		txtPleaseWaitConnecting.setEditable(false);
		joinChannel.add(txtPleaseWaitConnecting);
		txtPleaseWaitConnecting.setColumns(10);

		btnRefresh = new JButton("Refresh");
		btnRefresh.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				try {
					getChannelList();
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
			}
		});
		btnRefresh.setBounds(10, 333, 89, 46);
		joinChannel.add(btnRefresh);

		JButton btnJoin = new JButton("Join");
		btnJoin.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				String[] selected = list.getSelectedItems();
				System.out.println("Please wait...");
				if(selected.length == 0){
					System.out.println("Joining typed channel...");
					isJoiningAChannel = true; numChannelFlag = 1;
					main.doJoin("#" + txtPleaseWaitConnecting.getText());}
				else
					joinChannels(selected);
			}

			private void joinChannels(String[] selected){
				System.out.println("Joining selected channels...");
				String chanConcat = "";
				numChannelFlag = selected.length;
				for(int i = 0; i < selected.length; i++){
					chanConcat += selected[i].split(" :")[0] + ",";}
				chanConcat = chanConcat.substring(0, chanConcat.length()-1);
				System.out.println(chanConcat);
				isJoiningAChannel = true;
				main.doJoin(chanConcat);}
		});
		btnJoin.setBounds(10, 276, 89, 46);
		joinChannel.add(btnJoin);

		Panel createChannel = new Panel();
		tabbedPane.addTab("Create", null, createChannel, null);
		createChannel.setLayout(null);

		txtChannelNameHere = new JTextField();
		txtChannelNameHere.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				if(initialClick)
					txtChannelNameHere.setText("");
				initialClick = false;
			}
		});
		txtChannelNameHere.setFont(new Font("Tahoma", Font.PLAIN, 11));
		txtChannelNameHere.setText("Set Topic Here");
		txtChannelNameHere.setBounds(10, 11, 409, 28);
		createChannel.add(txtChannelNameHere);
		txtChannelNameHere.setColumns(10);

		txtSetPasswordHere = new JTextField();
		txtSetPasswordHere.setHorizontalAlignment(SwingConstants.CENTER);
		txtSetPasswordHere.setText("set password here");
		txtSetPasswordHere.setBounds(163, 255, 111, 20);
		createChannel.add(txtSetPasswordHere);
		txtSetPasswordHere.setColumns(10);

		txtLimit = new JTextField();
		txtLimit.setHorizontalAlignment(SwingConstants.CENTER);
		txtLimit.setText("limit");
		txtLimit.setBounds(95, 203, 58, 20);
		createChannel.add(txtLimit);
		txtLimit.setColumns(10);

		chckbxPrivChan = new JCheckBox("private channel flag");
		chckbxPrivChan.setBounds(10, 46, 121, 23);
		createChannel.add(chckbxPrivChan);

		chckbxSecretChannelFlag = new JCheckBox("secret channel flag");
		chckbxSecretChannelFlag.setBounds(10, 72, 121, 23);
		createChannel.add(chckbxSecretChannelFlag);

		chckbxInviteOnly = new JCheckBox("invite only");
		chckbxInviteOnly.setBounds(10, 98, 97, 23);
		createChannel.add(chckbxInviteOnly);

		chckbxTopicSettableBy = new JCheckBox("topic settable by channelop only");
		chckbxTopicSettableBy.setBounds(10, 124, 181, 23);
		createChannel.add(chckbxTopicSettableBy);

		chckbxNoMessagesTo = new JCheckBox("no messages to channel from outside clients");
		chckbxNoMessagesTo.setBounds(10, 150, 237, 23);
		createChannel.add(chckbxNoMessagesTo);

		chckbxModerated = new JCheckBox("moderated");
		chckbxModerated.setBounds(10, 176, 97, 23);
		createChannel.add(chckbxModerated);

		chckbxSetUserLimit = new JCheckBox("set user limit");
		chckbxSetUserLimit.setBounds(10, 202, 97, 23);
		createChannel.add(chckbxSetUserLimit);

		chckbxSetBanMask = new JCheckBox("set ban mask to keep users out");
		chckbxSetBanMask.setBounds(10, 230, 175, 23);
		createChannel.add(chckbxSetBanMask);

		chckbxSetPasswordFor = new JCheckBox("set password for channel");
		chckbxSetPasswordFor.setBounds(10, 254, 147, 23);
		createChannel.add(chckbxSetPasswordFor);

		JButton btnCreate = new JButton("Create");
		btnCreate.setBounds(29, 354, 162, 91);
		createChannel.add(btnCreate);
		main.connect();
	}