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

system.verbs.builtins.odbServer.commandHandle

on commandHandle (request, adrparams) {
	local (ipAddress, atts, command);
	odbServer.init ();
	ipAddress = netEvents.addressDecode (adrparams^.client);
	command = odbServer.commandDecode (request, @atts);
	try {
		if not user.odbServer.commandFilter (@atts) {
			return ("")}};
	case string.lower (command) {
		"ping" {
			return ("OK")}}
	else {
		try {
			return (user.odbServer.commands.[string.lower (command)] (@atts))}
		else {
			return ("Can't process the request because \"" + tryError + "\".")}}}
<<bundle <<test code
	<<commandHandle (scratchpad.encodedCommand, @scratchpad.odbServerparams)



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.