Monday, November 08, 2010 at 12:05 AM.

on getServerCapabilities (adrspec, flAlwaysGetCapabilities = false) {
		<<11/20/01; 2:36:51 AM by JES
			<<Get the password from[passwordName] instead of from the upstream spec cache.
		<<10/23/01; 10:32:54 AM by JES
			<<Changed <account> to <usernum>.
		<<8/15/01; 1:33:08 AM by JES
			<<Display our own message in the About window, instead of the message displayed by tcp.httpClient.
		<<7/24/01; 1:51:32 AM by JES
			<<New parameter, adrspec, is the address of a server specification table.
			<<New optional parameter: flAlwaysGetCapabilities. If true, always make the RPC call. Default is false.
			<<New return values: if successful, the address of the server capabilities table is returned. If not successful, false is returned.
	local (data = adrspec^);
	if not defined (data.fldebug) {
		data.fldebug = false};
	with data {
		local (adrServerData =[server]);
		if not defined (adrServerData^) {
			new (tableType, adrServerData)};
		local (adrServerCapabilities = @adrServerData^.serverCapabilities);
		if not defined (adrServerData^.timeLastServerCapabilities) {
			adrServerData^.timeLastServerCapabilities = date (0)};
		if not flAlwaysGetCapabilities {
			local (now = ());
			local (flGotWithinLast24Hrs = (now - adrServerData^.timeLastServerCapabilities) > (60 * 60 * 24));
			if not flGotWithinLast24Hrs { //ask again, once a day
				if defined (adrServerCapabilities^) {
					return (adrServerCapabilities)}}};
		msg ("Getting server info: " + data.server);
		if not xmlStorageSystem.getServerCapabilities (usernum,[passwordName], adrServerCapabilities, adrdata:@data, flMessages:false) {
			msg ("");
			return (false)};
		adrServerData^.timeLastServerCapabilities = ();
		msg ("");
		return (adrServerCapabilities)}}
<<bundle //debugging
	<<local (adrTable)
	<<adrTable = getServerCapabilities (["Backup:Radio UserLand:www:system:upstream:#upstream.xml"], true)
	<<edit (adrTable)

This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.