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/skype') 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/skype') 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/skype') 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/skype') 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 From 2ff0f378570177fe42e4bf48b63bea52369f80e8 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 30 Jun 2011 01:25:02 +0200 Subject: skyped: user configuration should have priority --- protocols/skype/skyped.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'protocols/skype') diff --git a/protocols/skype/skyped.py b/protocols/skype/skyped.py index c9bfc2ce..615d6835 100644 --- a/protocols/skype/skyped.py +++ b/protocols/skype/skyped.py @@ -335,9 +335,9 @@ class SkypeApi: class Options: def __init__(self): self.cfgpath = os.path.join(os.environ['HOME'], ".skyped", "skyped.conf") - # for backwards compatibility + # fall back to system-wide settings self.syscfgpath = "/usr/local/etc/skyped/skyped.conf" - if os.path.exists(self.syscfgpath): + if os.path.exists(self.syscfgpath) and not os.path.exists(self.cfgpath): self.cfgpath = self.syscfgpath self.daemon = True self.debug = False -- cgit v1.2.3 From 004f49486f537d0eac436eb9a750b22e6f9fa1f2 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 30 Jun 2011 01:30:33 +0200 Subject: skype: .gitignore -> .bzrignore --- protocols/skype/.bzrignore | 19 +++++++++++++++++++ protocols/skype/.gitignore | 19 ------------------- 2 files changed, 19 insertions(+), 19 deletions(-) create mode 100644 protocols/skype/.bzrignore delete mode 100644 protocols/skype/.gitignore (limited to 'protocols/skype') diff --git a/protocols/skype/.bzrignore b/protocols/skype/.bzrignore new file mode 100644 index 00000000..e90a033b --- /dev/null +++ b/protocols/skype/.bzrignore @@ -0,0 +1,19 @@ +Changelog +HEADER.html +*.gz +*.asc +.htaccess +shot +*.swp +aclocal.m4 +autom4te.cache +config.log +config.mak +config.status +configure +etc +install-sh +skype.so +skyped.conf +skyped.conf.dist +skype.dylib* diff --git a/protocols/skype/.gitignore b/protocols/skype/.gitignore deleted file mode 100644 index e90a033b..00000000 --- a/protocols/skype/.gitignore +++ /dev/null @@ -1,19 +0,0 @@ -Changelog -HEADER.html -*.gz -*.asc -.htaccess -shot -*.swp -aclocal.m4 -autom4te.cache -config.log -config.mak -config.status -configure -etc -install-sh -skype.so -skyped.conf -skyped.conf.dist -skype.dylib* -- cgit v1.2.3 From b5a5938849fe4d147cf050685589b47e7b9aedfd Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 3 Jul 2011 16:14:54 +0200 Subject: Install skyped if skype is enabled --- protocols/skype/skyped.conf.dist.in | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 protocols/skype/skyped.conf.dist.in (limited to 'protocols/skype') diff --git a/protocols/skype/skyped.conf.dist.in b/protocols/skype/skyped.conf.dist.in deleted file mode 100644 index 21e07796..00000000 --- a/protocols/skype/skyped.conf.dist.in +++ /dev/null @@ -1,10 +0,0 @@ -[skyped] -# change to your skype username -username = john -# use `echo -n foo|sha1sum` to generate this hash for your password -password = 0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33 - -# you have to change the following paths to your home directory: -cert = /home/YOUR_USER/.skyped/skyped.cert.pem -key = /home/YOUR_USER/.skyped/skyped.key.pem -port = 2727 -- cgit v1.2.3 From 51555706adf8a33b1e7f30b9d8d9c381c79b4123 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 3 Jul 2011 16:15:13 +0200 Subject: Install skyped documentation if skype is enabled --- protocols/skype/Makefile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'protocols/skype') diff --git a/protocols/skype/Makefile b/protocols/skype/Makefile index 4f7a036d..bebfe86c 100644 --- a/protocols/skype/Makefile +++ b/protocols/skype/Makefile @@ -1,4 +1,7 @@ --include config.mak +-include ../../Makefile.settings +ifdef SRCDIR +SRCDIR := $(SRCDIR)protocls/skype/ +endif VERSION = 0.9.0 DATE := $(shell date +%Y-%m-%d) @@ -79,7 +82,14 @@ release: gpg --comment "See http://vmiklos.hu/gpg/ for info" \ -ba bitlbee-skype-$(VERSION).tar.gz -doc: HEADER.html Changelog AUTHORS +doc: skyped.1 + +install-doc: + mkdir -p $(DESTDIR)$(MANDIR)/man1/ + install -m 0644 $(SRCDIR)skyped.1 $(DESTDIR)$(MANDIR)/man1/ + +uninstall-doc: + rm -f $(DESTDIR)$(MANDIR)/man1/skyped.1* HEADER.html: README Makefile asciidoc -a toc -a numbered -a sectids -o HEADER.html -a icons -a data-uri --attribute iconsdir=./images/icons README -- cgit v1.2.3 From b518cdc47eee56a969f157c228fa47f7a47afef9 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 3 Jul 2011 16:15:25 +0200 Subject: Drop no longer necessary autofoo from skype plugin dir --- protocols/skype/config.mak.in | 16 -------- protocols/skype/configure.ac | 96 ------------------------------------------- 2 files changed, 112 deletions(-) delete mode 100644 protocols/skype/config.mak.in delete mode 100644 protocols/skype/configure.ac (limited to 'protocols/skype') diff --git a/protocols/skype/config.mak.in b/protocols/skype/config.mak.in deleted file mode 100644 index 06698dad..00000000 --- a/protocols/skype/config.mak.in +++ /dev/null @@ -1,16 +0,0 @@ -CFLAGS = @CFLAGS@ -LDFLAGS = @LDFLAGS@ -SHARED_FLAGS = @SHARED_FLAGS@ -SHARED_EXT = @SHARED_EXT@ -SKYPE4PY = @SKYPE4PY@ -BITLBEE = @BITLBEE@ -ASCIIDOC = @ASCIIDOC@ -INSTALL = @INSTALL@ -prefix = @prefix@ -sysconfdir = @sysconfdir@/skyped -exec_prefix = @exec_prefix@ -bindir = @bindir@ -libdir = @libdir@ -plugindir = ${libdir}/bitlbee -datarootdir = @datarootdir@ -mandir = @mandir@ diff --git a/protocols/skype/configure.ac b/protocols/skype/configure.ac deleted file mode 100644 index a616758c..00000000 --- a/protocols/skype/configure.ac +++ /dev/null @@ -1,96 +0,0 @@ -AC_INIT([Skype plugin for BitlBee], 1.0, [vmiklos@vmiklos.hu], bitlbee-skype) -AC_PROG_CC -AC_PROG_INSTALL - -AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug], [Enable debug support (default: disabled)]), debug=yes) -AC_MSG_CHECKING(for debug mode request) -if test "x$debug" = "xyes" ; then - CFLAGS="-g -Wall -Werror" - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - -case "`$CC -dumpmachine`" in - *linux*|*freebsd*|*netbsd*|*openbsd*) - SHARED_FLAGS="-fPIC -shared" - SHARED_EXT="so" - ;; - *apple-darwin*) - SHARED_FLAGS="-dynamiclib -undefined dynamic_lookup" - SHARED_EXT="dylib" - ;; - *) - AC_MSG_ERROR([Your machine is not yet supported]) - ;; -esac -AC_SUBST(SHARED_FLAGS) -AC_SUBST(SHARED_EXT) - -dnl Check for bitlbee -AC_MSG_CHECKING(for BitlBee) -if test -d /usr/local/lib/pkgconfig; then - PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig - export PKG_CONFIG_PATH -fi -pkg-config --exists bitlbee -if test "$?" != "0"; then - AC_MSG_RESULT(no) - BITLBEE="no" -else - AC_MSG_RESULT(yes) - BITLBEE="yes" - if test -z "$CFLAGS"; then - CFLAGS="`pkg-config --cflags bitlbee`" - else - CFLAGS="$CFLAGS `pkg-config --cflags bitlbee`" - fi - if test -z "$LDFLAGS"; then - LDFLAGS="`pkg-config --libs bitlbee`" - else - LDFLAGS="$LDFLAGS `pkg-config --libs bitlbee`" - fi - prefix=`pkg-config --variable=prefix bitlbee` -fi -AC_SUBST(BITLBEE) - -dnl Check for a2x -AC_ARG_ENABLE([asciidoc], AS_HELP_STRING([--disable-asciidoc], [Disable asciidoc support (default: test)])) -if test "$enable_asciidoc" != "no"; then - AC_CHECK_PROG(ASCIIDOC, asciidoc, yes, []) -fi - -dnl Check for Skype4Py -AC_MSG_CHECKING(for Python module Skype4Py) -python2.7 -c "import Skype4Py" 2>&AS_MESSAGE_LOG_FD -if test "$?" != "0"; then - AC_MSG_RESULT(no) - SKYPE4PY="no" -else - AC_MSG_RESULT(yes) - SKYPE4PY="yes" -fi -AC_SUBST(SKYPE4PY) - -if test "$BITLBEE" = "no" -a "$SKYPE4PY" = "no"; then - AC_ERROR([In order to use bitlbee-skype you need at least BitlBee or Skype4Py installed.]) -fi - -AC_OUTPUT(config.mak) -AC_OUTPUT(skyped.conf.dist) - -echo " - BitlBee plugin: $BITLBEE - skyped: $SKYPE4PY - prefix: $prefix - install program: $INSTALL" -if test "$BITLBEE" = "yes"; then - echo " compiler flags: $CFLAGS - linker flags: $LDFLAGS - shared object flags: $SHARED_FLAGS - shared object extension: $SHARED_EXT" -fi -if test "$SKYPE4PY" = "yes"; then - echo " sysconfig dir: $sysconfdir/skyped" -fi -echo -- cgit v1.2.3 From ff18fc1612e9468a8406728e180b453ca6bd408a Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 27 Aug 2011 12:30:48 +0200 Subject: Fix #820, make Skype mod compile on NetBSD. (I haven't personally tested that the Skype module *works* after this nor have I received any reports that either confirm or deny this. This change just makes it *compile*.) --- protocols/skype/skype.c | 1 + 1 file changed, 1 insertion(+) (limited to 'protocols/skype') diff --git a/protocols/skype/skype.c b/protocols/skype/skype.c index 6a3e6393..5b1a6c30 100644 --- a/protocols/skype/skype.c +++ b/protocols/skype/skype.c @@ -22,6 +22,7 @@ #define _XOPEN_SOURCE #define _BSD_SOURCE #include +#include #include #include -- cgit v1.2.3 From d45b1813d7a7411585038a79d9636193aabe2d51 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 23 Nov 2011 17:27:59 +0100 Subject: Add missing 'skype/skyped.conf.dist' --- protocols/skype/skyped.conf.dist | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 protocols/skype/skyped.conf.dist (limited to 'protocols/skype') diff --git a/protocols/skype/skyped.conf.dist b/protocols/skype/skyped.conf.dist new file mode 100644 index 00000000..21e07796 --- /dev/null +++ b/protocols/skype/skyped.conf.dist @@ -0,0 +1,10 @@ +[skyped] +# change to your skype username +username = john +# use `echo -n foo|sha1sum` to generate this hash for your password +password = 0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33 + +# you have to change the following paths to your home directory: +cert = /home/YOUR_USER/.skyped/skyped.cert.pem +key = /home/YOUR_USER/.skyped/skyped.key.pem +port = 2727 -- cgit v1.2.3 From 57da9609d3b24014813ec39af844c70c466bcd9c Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 10 Dec 2011 22:43:10 +0000 Subject: Skype module packaging. --- protocols/skype/Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'protocols/skype') diff --git a/protocols/skype/Makefile b/protocols/skype/Makefile index bebfe86c..1a07cd80 100644 --- a/protocols/skype/Makefile +++ b/protocols/skype/Makefile @@ -1,6 +1,6 @@ -include ../../Makefile.settings ifdef SRCDIR -SRCDIR := $(SRCDIR)protocls/skype/ +SRCDIR := $(SRCDIR)protocols/skype/ endif VERSION = 0.9.0 @@ -22,9 +22,9 @@ endif all: $(LIBS) $(MANPAGES) -skype.$(SHARED_EXT): skype.c config.mak +skype.$(SHARED_EXT): $(SRCDIR)skype.c config.mak ifeq ($(BITLBEE),yes) - $(CC) $(CFLAGS) $(SHARED_FLAGS) -o skype.$(SHARED_EXT) skype.c $(LDFLAGS) + $(CC) $(CFLAGS) $(SHARED_FLAGS) -o skype.$(SHARED_EXT) $(SRCDIR)skype.c $(LDFLAGS) endif install: all @@ -46,7 +46,7 @@ ifeq ($(SKYPE4PY),yes) $(INSTALL) -m644 skyped.cnf $(DESTDIR)$(sysconfdir) endif -client: client.c +client: $(SRCDIR)client.c autogen: configure.ac cp $(shell ls /usr/share/automake-*/install-sh | tail -n1) ./ @@ -56,7 +56,7 @@ clean: rm -f $(LIBS) $(MANPAGES) distclean: clean - rm -f config.log config.mak config.status + rm -f config.log config.mak config.status skyped.1 autoclean: distclean rm -rf aclocal.m4 autom4te.cache configure install-sh @@ -102,6 +102,6 @@ Changelog: .git/refs/heads/master AUTHORS: .git/refs/heads/master git shortlog -s -n |sed 's/.*\t//'> AUTHORS -%.1: %.txt asciidoc.conf - a2x --asciidoc-opts="-f asciidoc.conf" \ +%.1: $(SRCDIR)%.txt $(SRCDIR)asciidoc.conf + a2x --asciidoc-opts="-f $(SRCDIR)asciidoc.conf" \ -a bs_version=$(VERSION) -a bs_date=$(DATE) -f manpage $< -- cgit v1.2.3 From e46db53456e89bcf9e0baf4c093c4b02e082819a Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 11 Dec 2011 12:12:24 +0000 Subject: Another packaging fix: Don't put skyped manpage in bitlbee-common. --- protocols/skype/Makefile | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'protocols/skype') diff --git a/protocols/skype/Makefile b/protocols/skype/Makefile index 1a07cd80..e048e0bc 100644 --- a/protocols/skype/Makefile +++ b/protocols/skype/Makefile @@ -7,6 +7,8 @@ VERSION = 0.9.0 DATE := $(shell date +%Y-%m-%d) # latest stable BITLBEE_VERSION = 3.0.1 +INSTALL = install +ASCIIDOC = yes ifeq ($(ASCIIDOC),yes) MANPAGES = skyped.1 @@ -27,11 +29,7 @@ ifeq ($(BITLBEE),yes) $(CC) $(CFLAGS) $(SHARED_FLAGS) -o skype.$(SHARED_EXT) $(SRCDIR)skype.c $(LDFLAGS) endif -install: all -ifeq ($(ASCIIDOC),yes) - $(INSTALL) -d $(DESTDIR)$(mandir)/man1 - $(INSTALL) -m644 $(MANPAGES) $(DESTDIR)$(mandir)/man1 -endif +install: all install-doc ifeq ($(BITLBEE),yes) $(INSTALL) -d $(DESTDIR)$(plugindir) $(INSTALL) skype.$(SHARED_EXT) $(DESTDIR)$(plugindir) @@ -56,7 +54,7 @@ clean: rm -f $(LIBS) $(MANPAGES) distclean: clean - rm -f config.log config.mak config.status skyped.1 + rm -f config.log config.mak config.status $(MANPAGES) autoclean: distclean rm -rf aclocal.m4 autom4te.cache configure install-sh @@ -82,11 +80,13 @@ release: gpg --comment "See http://vmiklos.hu/gpg/ for info" \ -ba bitlbee-skype-$(VERSION).tar.gz -doc: skyped.1 +doc: $(MANPAGES) -install-doc: - mkdir -p $(DESTDIR)$(MANDIR)/man1/ - install -m 0644 $(SRCDIR)skyped.1 $(DESTDIR)$(MANDIR)/man1/ +install-doc: doc +ifeq ($(ASCIIDOC),yes) + $(INSTALL) -d $(DESTDIR)$(MANDIR)/man1 + $(INSTALL) -m644 $(MANPAGES) $(DESTDIR)$(MANDIR)/man1 +endif uninstall-doc: rm -f $(DESTDIR)$(MANDIR)/man1/skyped.1* @@ -104,4 +104,4 @@ AUTHORS: .git/refs/heads/master %.1: $(SRCDIR)%.txt $(SRCDIR)asciidoc.conf a2x --asciidoc-opts="-f $(SRCDIR)asciidoc.conf" \ - -a bs_version=$(VERSION) -a bs_date=$(DATE) -f manpage $< + -a bs_version=$(VERSION) -a bs_date=$(DATE) -f manpage -D . $< -- cgit v1.2.3 From 6ba00ac2be7f59a730aca244d889cabba8e88bfc Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 12 Dec 2011 00:25:40 +0100 Subject: skyped: give reasonable error message when cert is missing --- protocols/skype/skyped.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'protocols/skype') diff --git a/protocols/skype/skyped.py b/protocols/skype/skyped.py index 615d6835..3b6499c1 100644 --- a/protocols/skype/skyped.py +++ b/protocols/skype/skyped.py @@ -197,11 +197,15 @@ def listener(sock, skype): if not hasgobject: if not(wait_for_lock(options.lock, 3, 10, "listener")): return False rawsock, addr = sock.accept() - options.conn = ssl.wrap_socket(rawsock, - server_side=True, - certfile=options.config.sslcert, - keyfile=options.config.sslkey, - ssl_version=ssl.PROTOCOL_TLSv1) + try: + options.conn = ssl.wrap_socket(rawsock, + server_side=True, + certfile=options.config.sslcert, + keyfile=options.config.sslkey, + ssl_version=ssl.PROTOCOL_TLSv1) + except ssl.SSLError: + dprint("Warning, SSL init failed, did you create your certificate?") + return False if hasattr(options.conn, 'handshake'): try: options.conn.handshake() -- cgit v1.2.3