From 17dd2eda62fa0b38907a6f565ab2203c7fbd270c Mon Sep 17 00:00:00 2001 From: Jan Hruban Date: Wed, 15 Jun 2011 14:13:58 +0200 Subject: Fix crash on inviting people to skype groupchats --- protocols/skype/skype.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'protocols') diff --git a/protocols/skype/skype.c b/protocols/skype/skype.c index 80279c54..ccbcaf37 100644 --- a/protocols/skype/skype.c +++ b/protocols/skype/skype.c @@ -1391,10 +1391,7 @@ void skype_chat_invite(struct groupchat *gc, char *who, char *message) struct im_connection *ic = gc->ic; char *ptr, *nick; - /* Unused parameter */ - who = who; - - nick = g_strdup(message); + nick = g_strdup(who); ptr = strchr(nick, '@'); if (ptr) *ptr = '\0'; -- cgit v1.2.3 From c573f1b53466e34c26296227e4c661df9cae1c15 Mon Sep 17 00:00:00 2001 From: Jan Hruban Date: Wed, 15 Jun 2011 14:18:16 +0200 Subject: Don't create new channel when skype groupchat turns from DIALOG to MULTI_SUBSCRIBED (works only when user initiates the chat, otherwise new channel is created anyway) --- protocols/skype/skype.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'protocols') diff --git a/protocols/skype/skype.c b/protocols/skype/skype.c index ccbcaf37..e681a2c4 100644 --- a/protocols/skype/skype.c +++ b/protocols/skype/skype.c @@ -911,8 +911,11 @@ static void skype_parse_chat(struct im_connection *ic, char *line) if (gc) imcb_chat_free(gc); if (!strcmp(info, "STATUS MULTI_SUBSCRIBED")) { - gc = imcb_chat_new(ic, id); - imcb_chat_name_hint(gc, id); + gc = bee_chat_by_title(ic->bee, ic, id); + if (!gc) { + gc = imcb_chat_new(ic, id); + imcb_chat_name_hint(gc, id); + } skype_printf(ic, "GET CHAT %s ADDER\n", id); skype_printf(ic, "GET CHAT %s TOPIC\n", id); } else if (!strcmp(info, "STATUS DIALOG") && sd->groupchat_with) { -- cgit v1.2.3 From bd114221b85ae8c1ffec41f1be98570030d33e03 Mon Sep 17 00:00:00 2001 From: Jan Hruban Date: Wed, 15 Jun 2011 14:18:49 +0200 Subject: Free skype groupchats on logout --- protocols/skype/skype.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'protocols') diff --git a/protocols/skype/skype.c b/protocols/skype/skype.c index e681a2c4..6a3e6393 100644 --- a/protocols/skype/skype.c +++ b/protocols/skype/skype.c @@ -1200,6 +1200,9 @@ static void skype_logout(struct im_connection *ic) skype_printf(ic, "SET USERSTATUS OFFLINE\n"); + while( ic->groupchats ) + imcb_chat_free(ic->groupchats->data); + for (i = 0; i < g_list_length(sd->groups); i++) { struct skype_group *sg = (struct skype_group *)g_list_nth_data(sd->groups, i); skype_group_free(sg, FALSE); -- cgit v1.2.3 From 05d964c32262a8b0ce3f8a5d2087d230a461df86 Mon Sep 17 00:00:00 2001 From: Jan Hruban Date: Wed, 15 Jun 2011 14:47:16 +0200 Subject: Bind to IPv6 address when -H is in IPv6 format --- protocols/skype/skyped.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'protocols') diff --git a/protocols/skype/skyped.py b/protocols/skype/skyped.py index 023c1f81..c9bfc2ce 100644 --- a/protocols/skype/skyped.py +++ b/protocols/skype/skyped.py @@ -179,7 +179,10 @@ def bitlbee_idle_handler(skype): def server(host, port, skype = None): global options - sock = socket.socket() + if ":" in host: + sock = socket.socket(socket.AF_INET6) + else: + sock = socket.socket() sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) sock.bind((host, port)) sock.listen(1) @@ -359,7 +362,7 @@ Options: -c --config path to configuration file (default: %s) -d --debug enable debug messages -h --help this help - -H --host set the tcp host (default: %s) + -H --host set the tcp host, supports IPv4 and IPv6 (default: %s) -l --log set the log file in background mode (default: none) -n --nofork don't run as daemon in the background -p --port set the tcp port (default: %s) -- cgit v1.2.3