@Override
	public String executeCommand(String cmd) throws Exception
	{
		final Vector<String> V=CMParms.parse(cmd);
		if(V.size()==0)
			throw new CMException("Unknown command!");
		final String word=V.firstElement();
		if(word.equalsIgnoreCase("START")&&(V.size()>1))
		{
			final String what=V.elementAt(1);
			if(what.equalsIgnoreCase("I3"))
			{
				startIntermud3();
				return "Done";
			}
			else
			if(what.equalsIgnoreCase("IMC2"))
			{
				startIntermud2();
				return "Done";
			}
			else
			if(what.equalsIgnoreCase("WEB"))
			{
				if(V.size()<3)
					return "Need Server Name";
				if(startWebServer(CMProps.instance(),V.elementAt(2)))
					return "Done";
				else
					return "Failure";
			}
		}
		else
		if(word.equalsIgnoreCase("STOP")&&(V.size()>1))
		{
			final String what=V.elementAt(1);
			if(what.equalsIgnoreCase("WEB"))
			{
				if(V.size()<3)
					return "Need Server Name";
				if(stopWebServer(V.elementAt(2)))
					return "Done";
				else
					return "Failure";
			}
		}
		else
		if(word.equalsIgnoreCase("WEBSERVER")&&(V.size()>2))
		{
			boolean admin = V.elementAt(1).equalsIgnoreCase("ADMIN");
			String var = V.elementAt(2);
			WebServer server=null;
			for(WebServer serv : webServers)
			{
				if(CMath.s_bool(serv.getConfig().getMiscProp("ADMIN")))
				{
					if(admin)
					{
						server=serv;
						break;
					}
				}
				else
				{
					if(!admin)
					{
						server=serv;
						break;
					}
				}
			}
			if(server==null)
				return "";
			if(var.equalsIgnoreCase("PORT"))
			{
				int[] ports = server.getConfig().getHttpListenPorts();
				if(ports.length==0)
					return "";
				return Integer.toString(ports[0]);
			}
			else
				throw new CMException("Unknown variable: "+var);
		}
		throw new CMException("Unknown command: "+word);
	}