<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -5,7 +5,9 @@
 Change Pidgin's status message.
 Status message is taken from a twitter's blog
 
-This script is NOT a plugin
+This script is NOT a plugin!!!
+
+License: GPLv3
 
 '''
 
@@ -26,7 +28,7 @@ def main():
 
   parser.add_option(&quot;--time&quot;, action=&quot;store&quot;, type=&quot;int&quot;,
     dest=&quot;time&quot;, help=&quot;interval to check new post (default: 30 minutes)&quot;,
-    default=30, metavar=&quot;INTERVALL&quot;)
+    default=30, metavar=&quot;INTERVAL&quot;)
 
   (options, args) = parser.parse_args()
 
@@ -44,13 +46,20 @@ def main():
     sys.exit(1)
 
   while True:
+    # Time's values
+    now = time.mktime(time.gmtime())
+    stringmsgtwittime = user.status.created_at + ' UTC'
+    msgtwittime = time.mktime(time.strptime(stringmsgtwittime, '%a %b %d %H:%M:%S +0000 %Y %Z'))
+
+    # Messages
     msgtwit = user.status.text
     msgnew = (msgtwit + &quot; (%s's twitter)&quot; % name).replace(&quot;\n&quot;,&quot;&quot;)
     msgold = subprocess.Popen(['purple-remote', 'getstatusmessage'],
-        stdout=subprocess.PIPE).communicate()[0].replace(&quot;\n&quot;,&quot;&quot;)
+      stdout=subprocess.PIPE).communicate()[0].replace(&quot;\n&quot;,&quot;&quot;)
 
-    # Check
-    if (msgold != msgnew):
+    # Sometimes the messages are equal but with different encoding (e.g. &quot;=&amp;quote)
+    if (msgold != msgnew or (msgtwittime+interval+1) &gt; now):
+      print &quot;Msg updated&quot;
       options = &quot;setstatus?message=%s&quot; % msgnew
       # Change Pidgin's status message
       if subprocess.call(['purple-remote', options], stdout=subprocess.PIPE):</diff>
      <filename>twitgin.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a824c5ca09056a5e56eb2eecdc832a43b4c7c3d0</id>
    </parent>
  </parents>
  <author>
    <name>ugaciaka</name>
    <email>ugaciaka@gmail.com</email>
  </author>
  <url>http://github.com/ugaciaka/script-for-my-pc/commit/61895e46ab870fa50c027e9321986f63e8ea2fcc</url>
  <id>61895e46ab870fa50c027e9321986f63e8ea2fcc</id>
  <committed-date>2009-10-18T09:35:28-07:00</committed-date>
  <authored-date>2009-10-18T09:35:28-07:00</authored-date>
  <message>Two check in if, write the license</message>
  <tree>a2442010ead05419f5ae1190d1382a26a166fdf6</tree>
  <committer>
    <name>ugaciaka</name>
    <email>ugaciaka@gmail.com</email>
  </committer>
</commit>
