Package: tircd
Version: 0.10-2
Severity: normal
Tags: patch upstream

Long retweets are cut off with an ellipsis due to the wrong part of
the json response. Upstream has a bug report and patch at [0].

[0] http://code.google.com/p/tircd/issues/detail?id=81


-- System Information:
Debian Release: 6.0.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686-bigmem (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages tircd depends on:
ii  libnet-twitter-lite-perl      0.10003-1  interface to the Twitter API
ii  libpoe-filter-ircd-perl       2.42-1     parser for the IRC protocol

tircd recommends no packages.

tircd suggests no packages.

-- no debconf information
--- tircd.pl    2010-08-08 12:04:07.000000000 +0200
+++ tircd.pl    2010-08-08 12:08:44.000000000 +0200
@@ -1376,7 +1376,12 @@
         foreach my $chan (keys %{$heap->{'channels'}}) {
           # - Send the message to the #twitter-channel if it is different from 
my latest update (IE different from current topic)
           if ($chan eq '#twitter' && exists 
$heap->{'channels'}->{$chan}->{'names'}->{$item->{'user'}->{'screen_name'}} && 
$item->{'text'} ne $heap->{'channels'}->{$chan}->{'topic'}) {
-            
$kernel->yield('user_msg','PRIVMSG',$item->{'user'}->{'screen_name'},$chan,$item->{'text'});
+                 if(defined($item->{'retweeted_status'})) {
+                         
$kernel->yield('user_msg','PRIVMSG',$item->{'user'}->{'screen_name'},$chan,'RT 
@' . $item->{'retweeted_status'}->{'user'}->{'screen_name'} . ': ' . 
$item->{'retweeted_status'}->{'text'});
+                 }
+                 else {
+                         
$kernel->yield('user_msg','PRIVMSG',$item->{'user'}->{'screen_name'},$chan,$item->{'text'});
+                 }
           }
           # - Send the message to the other channels the user is in if the 
user is not "me"
           if ($chan ne '#twitter' && exists 
$heap->{'channels'}->{$chan}->{'names'}->{$item->{'user'}->{'screen_name'}} && 
$item->{'user'}->{'screen_name'} ne $heap->{'username'}) {
--- tircd.pl    2010-08-08 12:04:07.000000000 +0200
+++ tircd.pl    2010-08-08 12:08:44.000000000 +0200
@@ -1376,7 +1376,12 @@
         foreach my $chan (keys %{$heap->{'channels'}}) {
           # - Send the message to the #twitter-channel if it is different from 
my latest update (IE different from current topic)
           if ($chan eq '#twitter' && exists 
$heap->{'channels'}->{$chan}->{'names'}->{$item->{'user'}->{'screen_name'}} && 
$item->{'text'} ne $heap->{'channels'}->{$chan}->{'topic'}) {
-            
$kernel->yield('user_msg','PRIVMSG',$item->{'user'}->{'screen_name'},$chan,$item->{'text'});
+                 if(defined($item->{'retweeted_status'})) {
+                         
$kernel->yield('user_msg','PRIVMSG',$item->{'user'}->{'screen_name'},$chan,'RT 
@' . $item->{'retweeted_status'}->{'user'}->{'screen_name'} . ': ' . 
$item->{'retweeted_status'}->{'text'});
+                 }
+                 else {
+                         
$kernel->yield('user_msg','PRIVMSG',$item->{'user'}->{'screen_name'},$chan,$item->{'text'});
+                 }
           }
           # - Send the message to the other channels the user is in if the 
user is not "me"
           if ($chan ne '#twitter' && exists 
$heap->{'channels'}->{$chan}->{'names'}->{$item->{'user'}->{'screen_name'}} && 
$item->{'user'}->{'screen_name'} ne $heap->{'username'}) {

Reply via email to