aboutsummaryrefslogtreecommitdiff
path: root/irc
diff options
context:
space:
mode:
authorAshish SHUKLA <ashish@FreeBSD.org>2010-07-13 11:25:35 +0000
committerAshish SHUKLA <ashish@FreeBSD.org>2010-07-13 11:25:35 +0000
commit5e28999ec9e34b4a33da81ca19aa40987f4981aa (patch)
tree0f60f32cb22eac2cfc0a7be0663ec93459adf1f8 /irc
parent60867a783f2e36e76ef5abca2ddda12fbed6ec62 (diff)
downloadports-5e28999ec9e34b4a33da81ca19aa40987f4981aa.tar.gz
ports-5e28999ec9e34b4a33da81ca19aa40987f4981aa.zip
Notes
Diffstat (limited to 'irc')
-rw-r--r--irc/bitlbee-otr/Makefile1
-rw-r--r--irc/bitlbee-otr/files/patch-protocols_twitter_twitter__lib.c56
2 files changed, 57 insertions, 0 deletions
diff --git a/irc/bitlbee-otr/Makefile b/irc/bitlbee-otr/Makefile
index 1c6aa117292c..c532232a85e8 100644
--- a/irc/bitlbee-otr/Makefile
+++ b/irc/bitlbee-otr/Makefile
@@ -7,6 +7,7 @@
PORTNAME= bitlbee-otr
PORTVERSION= 1.2.8
+PORTREVISION= 1
CATEGORIES= irc
MASTER_SITES= http://fbsd.zlonet.ru/distfiles/ \
http://wahjava.users.sourceforge.net/
diff --git a/irc/bitlbee-otr/files/patch-protocols_twitter_twitter__lib.c b/irc/bitlbee-otr/files/patch-protocols_twitter_twitter__lib.c
new file mode 100644
index 000000000000..214c25addf70
--- /dev/null
+++ b/irc/bitlbee-otr/files/patch-protocols_twitter_twitter__lib.c
@@ -0,0 +1,56 @@
+
+$FreeBSD$
+
+--- protocols/twitter/twitter_lib.c.orig
++++ protocols/twitter/twitter_lib.c
+@@ -77,7 +77,8 @@
+ static void txs_free(struct twitter_xml_status *txs)
+ {
+ g_free(txs->text);
+- txu_free(txs->user);
++ if(txs->user)
++ txu_free(txs->user);
+ g_free(txs);
+ }
+
+@@ -472,19 +473,22 @@
+ for ( l = list; l ; l = g_slist_next(l) )
+ {
+ status = l->data;
+- twitter_add_buddy(ic, status->user->screen_name, status->user->name);
+-
+- strip_html(status->text);
++ if(status->user)
++ {
++ twitter_add_buddy(ic, status->user->screen_name, status->user->name);
+
+- // Say it!
+- if (g_strcasecmp(td->user, status->user->screen_name) == 0)
+- imcb_chat_log (gc, "Your Tweet: %s", status->text);
+- else
+- imcb_chat_msg (gc, status->user->screen_name, status->text, 0, status->created_at );
++ strip_html(status->text);
+
+- // Update the home_timeline_id to hold the highest id, so that by the next request
+- // we won't pick up the updates allready in the list.
+- td->home_timeline_id = td->home_timeline_id < status->id ? status->id : td->home_timeline_id;
++ // Say it!
++ if (g_strcasecmp(td->user, status->user->screen_name) == 0)
++ imcb_chat_log (gc, "Your Tweet: %s", status->text);
++ else
++ imcb_chat_msg (gc, status->user->screen_name, status->text, 0, status->created_at );
++
++ // Update the home_timeline_id to hold the highest id, so that by the next request
++ // we won't pick up the updates allready in the list.
++ td->home_timeline_id = td->home_timeline_id < status->id ? status->id : td->home_timeline_id;
++ }
+ }
+ }
+
+@@ -735,4 +739,4 @@
+ args[0] = "screen_name";
+ args[1] = who;
+ twitter_http(ic, create ? TWITTER_FRIENDSHIPS_CREATE_URL : TWITTER_FRIENDSHIPS_DESTROY_URL, twitter_http_post, ic, 1, args, 2);
+-}
+\ No newline at end of file
++}