Monday, November 08, 2010 at 12:05 AM.
system.verbs.builtins.radio.thread.agents.pingWeblogsCom
<<Changes <<10/30/02; 4:13:56 PM by DW <<If we're pinging the "rss" category, send the public ping to a different server, rssrpc.weblogs.com. It's a much faster less clogged server. <<10/24/02; 6:26:53 AM by DW <<If the category is available, use it in pinging Weblogs.Com. This enables writeRssFile to request that we ping the RSS category. <<3/9/02; 12:58:20 PM by DW <<Hotted-up Weblogs.Com in the event log. <<3/9/02; 12:12:18 PM by DW <<If the pref is enabled, ping the local community server and also ping Weblogs.Com. <<2/25/02; 7:17:39 PM by JES <<Pass the address of user.radio.prefs.weblogUpdates to weblogUpdates.ping. <<1/21/02; 7:31:39 AM by DW <<Created. local (i); for i = sizeof (system.temp.radio.pingAfterUpstream) downto 1 { local (adr = @system.temp.radio.pingAfterUpstream [i]); if defined (adr^.flUpstreamed) { if adr^.flUpstreamed { try { local (name = adr^.name, url = adr^.url); if system.environment.isMac { name = latinToMac.macToLatin (name)}; local (categoryname = "none"); bundle { //set categoryname if defined (adr^.pingCategory) { categoryname = adr^.pingCategory}}; bundle { //do the ping and log it local (startticks = clock.ticks (), message); local (htmltext = "", fllocalping, flpublicping); bundle { //ping weblogs.com, if pref is enabled local (adrdata = radio.weblog.init ()); if adrdata^.prefs.flPublicBlog { //ping weblogs.com if categoryName == "rss" { //10/30/02 by DW weblogUpdates.publicRssPing (name, url)} else { weblogUpdates.ping (name, url, categoryName:categoryName)}; flpublicping = true}}; bundle { //ping the "local" community server if it's not rpc.weblogs.com if not tcp.equalNames (user.radio.prefs.weblogUpdates.server, "rpc.weblogs.com") { weblogUpdates.ping (name, url, adrdata:@user.radio.prefs.weblogUpdates, adrmessage:@message, categoryName:categoryName); fllocalping = true}}; bundle { //log the call local (whatupdated = "your weblog"); if categoryname == "rss" { whatupdated = "your RSS feed"}; local (s); if flpublicping { if fllocalping { s = "Notified <a href=\"http://www.weblogs.com.\">Weblogs.Com</a> and your local community server that " + whatupdated + " updated."} else { s = "Notified <a href=\"http://www.weblogs.com.\">Weblogs.Com</a> that " + whatupdated + " updated."}} else { if fllocalping { s = "Notified the local community server that " + whatupdated + " updated."} else { s = ""}}; if s != "" { radio.log.add ("Weblogs", s, startticks)}}}}; delete (adr)}}}
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.