<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -12,7 +12,7 @@ $Data::Dumper::Indent = 1;
 use vars qw($VERSION %IRSSI);
 
 $VERSION = &quot;2.0.5&quot;;
-my ($REV) = '$Rev: 480 $' =~ /(\d+)/;
+my ($REV) = '$Rev: 481 $' =~ /(\d+)/;
 %IRSSI = (
     authors     =&gt; 'Dan Boger',
     contact     =&gt; 'zigdon@gmail.com',
@@ -21,7 +21,7 @@ my ($REV) = '$Rev: 480 $' =~ /(\d+)/;
       . 'Can optionally set your bitlbee /away message to same',
     license =&gt; 'GNU GPL v2',
     url     =&gt; 'http://twirssi.com',
-    changed =&gt; '$Date: 2009-02-18 13:41:52 -0800 (Wed, 18 Feb 2009) $',
+    changed =&gt; '$Date: 2009-02-19 14:22:45 -0800 (Thu, 19 Feb 2009) $',
 );
 
 my $window;
@@ -81,20 +81,25 @@ sub cmd_direct_as {
     return unless &amp;valid_username($username);
 
     eval {
-        unless ( $twits{$username}
+        if ( $twits{$username}
             -&gt;new_direct_message( { user =&gt; $target, text =&gt; $text } ) )
         {
+            &amp;notice(&quot;DM sent to $target&quot;);
+            $nicks{$target} = time;
+        } else {
+            my $error;
+            eval {
+                $error = JSON::Any-&gt;jsonToObj( $twits{$username}-&gt;get_error() );
+                $error = $error-&gt;{error};
+            };
+            die $error if $error;
             &amp;notice(&quot;DM to $target failed&quot;);
-            return;
         }
     };
 
     if ($@) {
-        &amp;notice(&quot;DM caused an error: $@.  Aborted&quot;);
+        &amp;notice(&quot;DM caused an error: $@&quot;);
         return;
-    } else {
-        &amp;notice(&quot;DM sent to $target&quot;);
-        $nicks{$target} = time;
     }
 }
 
@@ -141,16 +146,18 @@ sub cmd_tweet_as {
 
     return if &amp;too_long($data);
 
+    my $success = 1;
     eval {
         unless ( $twits{$username}-&gt;update($data) )
         {
             &amp;notice(&quot;Update failed&quot;);
-            return;
+            $success = 0;
         }
     };
+    return unless $success;
 
     if ($@) {
-        &amp;notice(&quot;Update caused an error.  Aborted.&quot;);
+        &amp;notice(&quot;Update caused an error: $@.  Aborted.&quot;);
         return;
     }
 
@@ -238,6 +245,7 @@ sub cmd_reply_as {
 
     return if &amp;too_long($data);
 
+    my $success = 1;
     eval {
         unless (
             $twits{$username}-&gt;update(
@@ -249,12 +257,13 @@ sub cmd_reply_as {
           )
         {
             &amp;notice(&quot;Update failed&quot;);
-            return;
+            $success = 0;
         }
     };
+    return unless $success;
 
     if ($@) {
-        &amp;notice(&quot;Update caused an error.  Aborted&quot;);
+        &amp;notice(&quot;Update caused an error: $@.  Aborted&quot;);
         return;
     }
 
@@ -281,13 +290,15 @@ sub gen_cmd {
             return;
         }
 
+        my $success = 1;
         eval {
             unless ( $twit-&gt;$api_name($data) )
             {
                 &amp;notice(&quot;$api_name failed&quot;);
-                return;
+                $success = 0;
             }
         };
+        return unless $success;
 
         if ($@) {
             &amp;notice(&quot;$api_name caused an error.  Aborted.&quot;);
@@ -689,7 +700,8 @@ sub do_updates {
     };
 
     if ($@) {
-        print $fh &quot;type:debug Error during friends_timeline call.  Aborted.\n&quot;;
+        print $fh
+          &quot;type:debug Error during friends_timeline call: $@.  Aborted.\n&quot;;
         return 1;
     }
 </diff>
      <filename>twirssi.pl</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a6c66dd36bdcbd7c740827e5cf37fb4ade5d0a61</id>
    </parent>
  </parents>
  <author>
    <name>Dan Boger</name>
    <login></login>
    <email>zigdon@irc.peeron.com</email>
  </author>
  <url>http://github.com/bssteph/twirssi/commit/6e2d1f7b739136086662bb4b4fb1a6c5d75d2b8a</url>
  <id>6e2d1f7b739136086662bb4b4fb1a6c5d75d2b8a</id>
  <committed-date>2009-02-19T14:23:34-08:00</committed-date>
  <authored-date>2009-02-19T14:23:34-08:00</authored-date>
  <message>r481 - apparently, returns return from evals.  Adjusted code.</message>
  <tree>8d30a9b22d81967322c1cfc1faa34f473198cbb0</tree>
  <committer>
    <name>Dan Boger</name>
    <login></login>
    <email>zigdon@irc.peeron.com</email>
  </committer>
</commit>
