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

system.verbs.builtins.tcp.im.builtinDrivers.jabber.code.examples.rpc.handler

on handler ( iq, query, connection ) {
	<<Changes
		<<5/14/02; 1:51:34 PM by JB
			<<Changelog created.
	<<This is the handler for RPC calls. You can just run the code, and it should self-install. This is because of what the last line of the code is, not a feature of running handler scripts.
	local ( type );
	type = xml.getAttributeValue ( iq, "type" );
	if type == "set" {
		tcp.im.builtinDrivers.jabber.code.examples.rpc.xmlrpcCall(connection, mesAdr, iq, query)};
	if type == "result" {
		try { // could lose the idtable in mid-processing, causing a script error at "if id^.jabberXMLRPCflAsync"
			tcp.im.builtinDrivers.jabber.code.examples.rpc.xmlrpcResponse(connection, mesAdr, iq, query)}}};
tcp.im.builtinDrivers.jabber.code.registerHandler ( "iq", this, namespace: "jabber:iq:rpc" )



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.