public void refreshScripts() {
		scripts.removeAll();
		for (final Script script : IRCClient.scriptManager.scripts) {
			JMenuItem item = new JMenuItem(script.getName());
			if (script instanceof InvalidScript) {
				continue;
			} else {
				if (channel.activeScripts.contains(script)) {
					item.setEnabled(false);
				} else {
					item.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent e) {
							channel.registerScript((ValidScript) script);
							appendRawLine("<div class='notification'>Enabled script "
									+ script.getName() + "</div>");
						}
					});
				}
			}
			scripts.add(item);
		}
	}