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

system.verbs.builtins.tcp.im.log.add

on add (htmltext, startticks) {
	local (adrtable = log.addToGuestDatabase (user.im.prefs.logName, flHourlyRoll:true));
	local (secs);
	bundle { //set secs
		local (s = string (double (clock.ticks () - startticks) / 60));
		local (lod = string.nthfield (s, ".", 1));
		local (rod = string.nthfield (s, ".", 2));
		if sizeof (rod) > 3 {
			rod = string.mid (rod, 1, 3)}
		else {
			if sizeof (rod) < 3 {
				rod = string.padwithzeros (rod, 3)}};
		secs = lod + "." + rod};
	adrtable^.secs = secs;
	adrtable^.htmltext = htmltext;
	adrtable^.eventType = "Instant Message"}



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.