diff -u /home/jimw/serendipity/serendipity_functions.inc.php s9y/serendipity_functions.inc.php
--- /home/jimw/serendipity/serendipity_functions.inc.php	Fri Nov 14 04:27:25 2003
+++ s9y/serendipity_functions.inc.php	Sat Dec 13 21:53:15 2003
@@ -3,6 +3,7 @@
 include_once('./serendipity_db.inc.php');
 include_once('./compat.php');
 include_once('./serendipity_functions_config.inc.php');
+include_once('./bundled-libs/XML/RPC.php');
 $serendipity['imageList'] = array();
 
 function serendipity_userLoggedIn() {
@@ -1764,7 +1765,49 @@
 
     serendipity_purgeEntry($entry['id'], $entry['timestamp']);
 
+    # XXX this may not handle a previously-entered draft being made live
+    if ( $entry['isdraft'] == 'false' && $newEntry ) {
+        serendipity_announceEntry();
+    }
+
     return (int)$entry['id'];
+}
+
+/**
+* Announces a new entry to any ping services that are registered.
+**/
+function serendipity_announceEntry() {
+    global $serendipity;
+
+    # TODO: allow the list of services to be configured somewhere
+
+    $services = array(
+#      'weblogs.com' => array( 'host' => 'rpc.weblogs.com', 'path' => '/RPC2' ),
+      'blo.gs' => array( 'host' => 'ping.blo.gs', 'path' => '/', 'extended' => true ),
+#      'blogrolling.com' => array( 'host' => 'rpc.blogrolling.com', 'path' => '/pinger/' ),
+#      'technorati.com' => array( 'host' => 'rpc.technorati.com', 'path' => '/rpc/ping' ),
+    );
+
+    foreach ($services as $service => $details) {
+        # XXX append $serendipity['indexFile'] to baseURL?
+        $args = array(new XML_RPC_Value($serendipity['blogTitle'], 'string'), new XML_RPC_Value($serendipity['baseURL'], 'string'));
+        if ($details['extended']) {
+            # the checkUrl: for when the main page is not really the main page
+            $args[] = new XML_RPC_Value('', 'string');
+            # the rssUrl
+            $args[] = new XML_RPC_Value($serendipity['baseURL'] . 'rss.php?version=2.0', 'string');
+        }
+        $message = new XML_RPC_Message($details['extended'] ? 'weblogUpdates.extendedPing' : 'weblogUpdates.ping', $args );
+
+        $client = new XML_RPC_Client($details['path'], $details['host']);
+
+        # 15 second timeout may not be long enough for weblogs.com
+        $result = $client->send($message, 15);
+
+        # TODO do something with the result? (do we care?)
+    }
+
+    return true;
 }
 
 /**

