<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -13,6 +13,7 @@ from twisted.protocols import memcache
 
 from wokkel.xmppim import MessageProtocol, PresenceClientProtocol
 from wokkel.xmppim import AvailablePresence
+from wokkel import ping
 
 import xmpp_commands
 import config
@@ -83,19 +84,15 @@ class TwitterspyMessageProtocol(MessageProtocol):
         return prefix + str(self._pubid)
 
     def ping(self, fromjid, tojid):
-        iq = IQ(self.xmlstream, 'get')
-        iq['from'] = config.SCREEN_NAME
-        iq['to'] = tojid
-        iq.addElement((&quot;urn:xmpp:ping&quot;, 'ping'))
-        d = iq.send()
-        start_time = time.time()
-        log.msg(&quot;Sending ping %s&quot; % iq.toXml())
+        p = ping.Ping(self.xmlstream, config.SCREEN_NAME, tojid)
+        d = p.send()
+        log.msg(&quot;Sending ping %s&quot; % p.toXml())
         def _gotPing(x):
-            duration = time.time() - start_time
+            duration = time.time() - p.start_time
             log.msg(&quot;pong %s&quot; % tojid)
             self.send_plain(fromjid, &quot;Pong (%s) - %fs&quot; % (tojid, duration))
         def _gotError(x):
-            duration = time.time() - start_time
+            duration = time.time() - p.start_time
             log.msg(&quot;Got an error pinging %s: %s&quot; % (tojid, x))
             self.send_plain(fromjid, &quot;Error pinging %s (%fs): %s&quot; % (tojid, duration, x))
         d.addCallback(_gotPing)</diff>
      <filename>lib/twitterspy/protocol.py</filename>
    </modified>
    <modified>
      <diff>@@ -1 +1 @@
-Subproject commit 2ce0add5793051f841b502f99caff1c251c0ad05
+Subproject commit 18796ca973db33d65bf3a6653c95d715e0c82a79</diff>
      <filename>lib/wokkel</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ec248e77ac1556d09f5f17d1620de47ede9aea95</id>
    </parent>
  </parents>
  <author>
    <name>Dustin Sallings</name>
    <email>dustin@spy.net</email>
  </author>
  <url>http://github.com/dustin/twitterspy/commit/54260001ed85e77fda3d6a8bda0e2d96e1e81111</url>
  <id>54260001ed85e77fda3d6a8bda0e2d96e1e81111</id>
  <committed-date>2009-01-05T20:59:37-08:00</committed-date>
  <authored-date>2009-01-05T19:52:06-08:00</authored-date>
  <message>Use ping message from wokkel instead of handcrafting one.</message>
  <tree>d6b8d556d89aa4fb9afd614839eb60c0f19e3c00</tree>
  <committer>
    <name>Dustin Sallings</name>
    <email>dustin@spy.net</email>
  </committer>
</commit>
