--- bitlbee-3.0.4+bzr855.orig/root_commands.c +++ bitlbee-3.0.4+bzr855/root_commands.c @@ -361,7 +361,7 @@ set_t *s = *head; while( s ) { - if( !( s->flags & SET_HIDDEN ) ) + if( set_isvisible( s ) ) cmd_showset( irc, &s, s->key ); s = s->next; } @@ -412,8 +412,8 @@ for( a = irc->b->accounts; a; a = a->next ) if( strcmp( a->pass, PASSWORD_PENDING ) == 0 ) { - irc_rootmsg( irc, "Enter password for account %s(%s) " - "first (use /OPER)", a->prpl->name, a->user ); + irc_rootmsg( irc, "Enter password for account %s " + "first (use /OPER)", a->tag ); return; } @@ -442,7 +442,8 @@ set_setstr( &a->set, "server", cmd[5] ); } - irc_rootmsg( irc, "Account successfully added%s", cmd[4] ? "" : + irc_rootmsg( irc, "Account successfully added with tag %s%s", + a->tag, cmd[4] ? "" : ", now use /OPER to enter the password" ); return; @@ -489,8 +490,8 @@ if( !a->ic && a->auto_connect ) { if( strcmp( a->pass, PASSWORD_PENDING ) == 0 ) - irc_rootmsg( irc, "Enter password for account %s(%s) " - "first (use /OPER)", a->prpl->name, a->user ); + irc_rootmsg( irc, "Enter password for account %s " + "first (use /OPER)", a->tag ); else account_on( irc->b, a ); } @@ -552,8 +553,8 @@ if( a->ic ) irc_rootmsg( irc, "Account already online" ); else if( strcmp( a->pass, PASSWORD_PENDING ) == 0 ) - irc_rootmsg( irc, "Enter password for account %s(%s) " - "first (use /OPER)", a->prpl->name, a->user ); + irc_rootmsg( irc, "Enter password for account %s " + "first (use /OPER)", a->tag ); else account_on( irc->b, a ); } @@ -1092,7 +1093,7 @@ if( bu->status_msg ) g_snprintf( st, sizeof( st ) - 1, "Online (%s)", bu->status_msg ); - g_snprintf( s, sizeof( s ) - 1, "%s %s(%s)", bu->handle, bu->ic->acc->prpl->name, bu->ic->acc->user ); + g_snprintf( s, sizeof( s ) - 1, "%s %s", bu->handle, bu->ic->acc->tag ); irc_rootmsg( irc, format, iu->nick, s, st ); } @@ -1110,7 +1111,7 @@ if( away == 1 ) { - g_snprintf( s, sizeof( s ) - 1, "%s %s(%s)", bu->handle, bu->ic->acc->prpl->name, bu->ic->acc->user ); + g_snprintf( s, sizeof( s ) - 1, "%s %s", bu->handle, bu->ic->acc->tag ); irc_rootmsg( irc, format, iu->nick, s, irc_user_get_away( iu ) ); } n_away ++; @@ -1127,7 +1128,7 @@ if( offline == 1 ) { - g_snprintf( s, sizeof( s ) - 1, "%s %s(%s)", bu->handle, bu->ic->acc->prpl->name, bu->ic->acc->user ); + g_snprintf( s, sizeof( s ) - 1, "%s %s", bu->handle, bu->ic->acc->tag ); irc_rootmsg( irc, format, iu->nick, s, "Offline" ); } n_offline ++; @@ -1151,7 +1152,7 @@ for( num = 0; q; q = q->next, num ++ ) if( q->ic ) /* Not necessary yet, but it might come later */ - irc_rootmsg( irc, "%d, %s(%s): %s", num, q->ic->acc->prpl->name, q->ic->acc->user, q->question ); + irc_rootmsg( irc, "%d, %s: %s", num, q->ic->acc->tag, q->question ); else irc_rootmsg( irc, "%d, BitlBee: %s", num, q->question ); } --- bitlbee-3.0.4+bzr855.orig/bitlbee.h +++ bitlbee-3.0.4+bzr855/bitlbee.h @@ -26,6 +26,10 @@ #ifndef _BITLBEE_H #define _BITLBEE_H +#ifdef __cplusplus +extern "C" { +#endif + #ifndef _GNU_SOURCE #define _GNU_SOURCE /* Stupid GNU :-P */ #endif @@ -174,4 +178,9 @@ extern global_t global; +#ifdef __cplusplus +} #endif + +#endif + --- bitlbee-3.0.4+bzr855.orig/set.h +++ bitlbee-3.0.4+bzr855/set.h @@ -48,6 +48,7 @@ SET_NULL_OK = 0x0100, SET_HIDDEN = 0x0200, SET_PASSWORD = 0x0400, + SET_HIDDEN_DEFAULT = 0x0800, } set_flags_t; typedef struct set @@ -97,6 +98,9 @@ void set_del( set_t **head, const char *key ); int set_reset( set_t **head, const char *key ); +/* returns true if a setting shall be shown to the user */ +int set_isvisible( set_t *set ); + /* Two very useful generic evaluators. */ char *set_eval_int( set_t *set, char *value ); char *set_eval_bool( set_t *set, char *value ); --- bitlbee-3.0.4+bzr855.orig/set.c +++ bitlbee-3.0.4+bzr855/set.c @@ -111,6 +111,14 @@ return bool2int( s ); } +int set_isvisible( set_t *set ) +{ + /* the default value is not stored in value, only in def */ + return !( ( set->flags & SET_HIDDEN ) || + ( ( set->flags & SET_HIDDEN_DEFAULT ) && + ( set->value == NULL ) ) ); +} + int set_setstr( set_t **head, const char *key, char *value ) { set_t *s = set_find( head, key ); --- bitlbee-3.0.4+bzr855.orig/irc_commands.c +++ bitlbee-3.0.4+bzr855/irc_commands.c @@ -433,12 +433,12 @@ { set_setstr( &a->set, "password", password ); irc_rootmsg( irc, "Password added to IM account " - "%s(%s)", a->prpl->name, a->user ); + "%s", a->tag ); /* The IRC client may expect this. 491 suggests the OPER password was wrong, so the client won't expect a +o. It may however repeat the password prompt. We'll see. */ irc_send_num( irc, 491, ":Password added to IM account " - "%s(%s)", a->prpl->name, a->user ); + "%s", a->tag ); } } else if( irc->status & OPER_HACK_IDENTIFY ) --- bitlbee-3.0.4+bzr855.orig/irc.h +++ bitlbee-3.0.4+bzr855/irc.h @@ -181,7 +181,7 @@ gboolean (*privmsg)( irc_channel_t *ic, const char *msg ); gboolean (*join)( irc_channel_t *ic ); gboolean (*part)( irc_channel_t *ic, const char *msg ); - gboolean (*topic)( irc_channel_t *ic, const char *new ); + gboolean (*topic)( irc_channel_t *ic, const char *new_topic ); gboolean (*invite)( irc_channel_t *ic, irc_user_t *iu ); gboolean (*_init)( irc_channel_t *ic ); @@ -331,16 +331,16 @@ void irc_send_msg( irc_user_t *iu, const char *type, const char *dst, const char *msg, const char *prefix ); void irc_send_msg_raw( irc_user_t *iu, const char *type, const char *dst, const char *msg ); void irc_send_msg_f( irc_user_t *iu, const char *type, const char *dst, const char *format, ... ) G_GNUC_PRINTF( 4, 5 ); -void irc_send_nick( irc_user_t *iu, const char *new ); +void irc_send_nick( irc_user_t *iu, const char *new_nick ); void irc_send_channel_user_mode_diff( irc_channel_t *ic, irc_user_t *iu, - irc_channel_user_flags_t old, irc_channel_user_flags_t new ); + irc_channel_user_flags_t old_flags, irc_channel_user_flags_t new_flags ); void irc_send_invite( irc_user_t *iu, irc_channel_t *ic ); /* irc_user.c */ irc_user_t *irc_user_new( irc_t *irc, const char *nick ); int irc_user_free( irc_t *irc, irc_user_t *iu ); irc_user_t *irc_user_by_name( irc_t *irc, const char *nick ); -int irc_user_set_nick( irc_user_t *iu, const char *new ); +int irc_user_set_nick( irc_user_t *iu, const char *new_nick ); gint irc_user_cmp( gconstpointer a_, gconstpointer b_ ); const char *irc_user_get_away( irc_user_t *iu ); void irc_user_quit( irc_user_t *iu, const char *msg ); --- bitlbee-3.0.4+bzr855.orig/Makefile +++ bitlbee-3.0.4+bzr855/Makefile @@ -84,11 +84,11 @@ endif install-bin: - mkdir -p $(DESTDIR)$(BINDIR) - install -m 0755 $(OUTFILE) $(DESTDIR)$(BINDIR)/$(OUTFILE) + mkdir -p $(DESTDIR)$(SBINDIR) + install -m 0755 $(OUTFILE) $(DESTDIR)$(SBINDIR)/$(OUTFILE) uninstall-bin: - rm -f $(DESTDIR)$(BINDIR)/$(OUTFILE) + rm -f $(DESTDIR)$(SBINDIR)/$(OUTFILE) install-dev: mkdir -p $(DESTDIR)$(INCLUDEDIR) @@ -112,18 +112,23 @@ rm -f $(DESTDIR)$(ETCDIR)/bitlbee.conf -rmdir $(DESTDIR)$(ETCDIR) -install-plugins: +install-plugins: install-plugin-otr install-plugin-skype + +install-plugin-otr: ifdef OTR_PI mkdir -p $(DESTDIR)$(PLUGINDIR) install -m 0755 otr.so $(DESTDIR)$(PLUGINDIR) endif + +install-plugin-skype: ifdef SKYPE_PI mkdir -p $(DESTDIR)$(PLUGINDIR) install -m 0755 skype.so $(DESTDIR)$(PLUGINDIR) - mkdir -p $(DESTDIR)$(ETCDIR)/../skyped + mkdir -p $(DESTDIR)$(ETCDIR)/../skyped $(DESTDIR)$(BINDIR) install -m 0644 $(SRCDIR)protocols/skype/skyped.cnf $(DESTDIR)$(ETCDIR)/../skyped/skyped.cnf install -m 0644 $(SRCDIR)protocols/skype/skyped.conf.dist $(DESTDIR)$(ETCDIR)/../skyped/skyped.conf install -m 0755 $(SRCDIR)protocols/skype/skyped.py $(DESTDIR)$(BINDIR)/skyped + make -C protocols/skype install-doc endif systemd: --- bitlbee-3.0.4+bzr855.orig/configure +++ bitlbee-3.0.4+bzr855/configure @@ -8,7 +8,8 @@ ############################## prefix='/usr/local/' -bindir='$prefix/sbin/' +bindir='$prefix/bin/' +sbindir='$prefix/sbin/' etcdir='$prefix/etc/bitlbee/' mandir='$prefix/share/man/' datadir='$prefix/share/bitlbee/' @@ -58,6 +59,7 @@ --prefix=... Directories to put files in $prefix --bindir=... $bindir +--sbindir=... $sbindir --etcdir=... $etcdir --mandir=... $mandir --datadir=... $datadir @@ -98,6 +100,7 @@ # Expand $prefix and get rid of double slashes bindir=`eval echo "$bindir/" | sed 's/\/\{1,\}/\//g'` +sbindir=`eval echo "$sbindir/" | sed 's/\/\{1,\}/\//g'` etcdir=`eval echo "$etcdir/" | sed 's/\/\{1,\}/\//g'` mandir=`eval echo "$mandir/" | sed 's/\/\{1,\}/\//g'` datadir=`eval echo "$datadir/" | sed 's/\/\{1,\}/\//g'` @@ -116,6 +119,7 @@ ## BitlBee settings, generated by configure PREFIX=$prefix BINDIR=$bindir +SBINDIR=$sbindir ETCDIR=$etcdir MANDIR=$mandir DATADIR=$datadir @@ -325,6 +329,8 @@ } RESOLV_TESTCODE=' +#include +#include #include #include @@ -337,11 +343,18 @@ detect_resolv_dynamic() { + case "$arch" in + FreeBSD ) + # In FreeBSD res_* routines are present in libc.so + LIBRESOLV=;; + * ) + LIBRESOLV=-lresolv;; + esac TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX) ret=1 - echo "$RESOLV_TESTCODE" | $CC -o $TMPFILE -x c - -lresolv >/dev/null 2>/dev/null + echo "$RESOLV_TESTCODE" | $CC -o $TMPFILE -x c - $LIBRESOLV >/dev/null 2>/dev/null if [ "$?" = "0" ]; then - echo 'EFLAGS+=-lresolv' >> Makefile.settings + echo "EFLAGS+=$LIBRESOLV" >> Makefile.settings ret=0 fi --- bitlbee-3.0.4+bzr855.orig/debian/changelog +++ bitlbee-3.0.4+bzr855/debian/changelog @@ -1,3 +1,34 @@ +bitlbee (3.0.4+bzr855-1) unstable; urgency=low + + * New upstream release. + * This is not a vanilla 3.0.4 tree but a Bazaar snapshot. The source + release was a few weeks ago by now. There should be no significant + differences. + * Added bitlbee-plugin-skype and skyped packages, now part of BitlBee + instead of a separate package. Not building these for Debian for now + though since python-skype was removed. + * ^B and some other things are stripped in outgoing XMPP stanzas. + (Closes: #507856) + * OTR module linking fix. Not with the fix from the Debian bug but with + one from bugs.bitlbee.org. I hope that covers it. (Closes: #646369) + * Closing a few old bugs that were filed against the Debian package + instead of/as well as upstream: + - Joining password-protected MUCs is working for a while already, set + the password using "chan set". (Closes: #615624) + - "Headline:" msgs (Closes: #605459) + - Yahoo! was fixed long ago and Etch is deprecated. (Closes: #476529) + - identi.ca support is documented. (Closes: #613789) + + -- Wilmer van der Gaast Tue, 20 Dec 2011 12:46:42 +0100 + +bitlbee (3.0.3-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Use the standard ${source:Version} and ${binary:Version} substvars instead + of the custom and broken ${bee:Version} (closes: #651612). + + -- Julien Cristau Thu, 15 Dec 2011 20:34:32 +0100 + bitlbee (3.0.3-1) unstable; urgency=low * New upstream release. (Skipped 3.0.2, sorry!) --- bitlbee-3.0.4+bzr855.orig/debian/bitlbee-plugin-skype.docs +++ bitlbee-3.0.4+bzr855/debian/bitlbee-plugin-skype.docs @@ -0,0 +1,2 @@ +protocols/skype/NEWS +protocols/skype/README --- bitlbee-3.0.4+bzr855.orig/debian/rules +++ bitlbee-3.0.4+bzr855/debian/rules @@ -7,15 +7,18 @@ # exercise is over now. # -# Include the bitlbee-libpurple variant and OTR plugin by default +# Include the bitlbee-libpurple variant and OTR plugin by default. +# Don't build skype by default since it depends on deleted/non-free +# packages. Need to at least get python-skype back into Debian. BITLBEE_LIBPURPLE ?= 1 BITLBEE_OTR ?= plugin +BITLBEE_SKYPE ?= 0 BITLBEE_CONFIGURE_FLAGS ?= DEBUG ?= 0 ifndef BITLBEE_VERSION # Want to use the full package version number instead of just the release. -BITLBEE_CONFIGURE_VERSION ?= BITLBEE_VERSION=\"$(shell dpkg-parsechangelog | grep ^Version: | awk '{print $$2}')\" +BITLBEE_CONFIGURE_VERSION ?= BITLBEE_VERSION=\"$(shell dpkg-parsechangelog | awk '/^Version:/ {print $$2}')\" endif ifneq ($(BITLBEE_LIBPURPLE),1) @@ -26,12 +29,16 @@ DH_OPTIONS += -Nbitlbee-plugin-otr endif +ifneq ($(BITLBEE_SKYPE),plugin) +DH_OPTIONS += -Nbitlbee-plugin-skype -Nskyped +endif + build: build-stamp build-stamp: dh_testdir mkdir -p debian/build-native - ROOT=$$PWD; cd debian/build-native; $(BITLBEE_CONFIGURE_VERSION) $$ROOT/configure --debug=$(DEBUG) --prefix=/usr --etcdir=/etc/bitlbee --events=libevent --otr=$(BITLBEE_OTR) $(BITLBEE_CONFIGURE_FLAGS) + ROOT=$$PWD; cd debian/build-native; $(BITLBEE_CONFIGURE_VERSION) $$ROOT/configure --debug=$(DEBUG) --prefix=/usr --etcdir=/etc/bitlbee --events=libevent --otr=$(BITLBEE_OTR) --skype=$(BITLBEE_SKYPE) $(BITLBEE_CONFIGURE_FLAGS) $(MAKE) -C debian/build-native ifeq ($(BITLBEE_LIBPURPLE),1) @@ -63,7 +70,16 @@ $(MAKE) -C debian/build-native install-bin DESTDIR=`pwd`/debian/bitlbee $(MAKE) -C debian/build-native install-etc install-doc DESTDIR=`pwd`/debian/bitlbee-common $(MAKE) -C debian/build-native install-dev DESTDIR=`pwd`/debian/bitlbee-dev - $(MAKE) -C debian/build-native install-plugins DESTDIR=`pwd`/debian/bitlbee-plugin-otr + $(MAKE) -C debian/build-native install-plugin-otr DESTDIR=`pwd`/debian/bitlbee-plugin-otr + $(MAKE) -C debian/build-native install-plugin-skype DESTDIR=`pwd`/debian/skyped + +ifneq ($(BITLBEE_SKYPE),0) + mkdir -p debian/bitlbee-plugin-skype/usr + mv debian/skyped/usr/lib debian/bitlbee-plugin-skype/usr + + mkdir -p debian/skyped/usr/share/man/man1 + mv debian/bitlbee-common/usr/share/man/man1/skyped* debian/skyped/usr/share/man/man1 +endif ifeq ($(BITLBEE_LIBPURPLE),1) $(MAKE) -C debian/build-libpurple install-bin DESTDIR=`pwd`/debian/bitlbee-libpurple @@ -94,9 +110,9 @@ dh_installdeb dh_shlibdeps ifdef BITLBEE_VERSION - dh_gencontrol -- -v$(BITLBEE_VERSION) -Vbee:Version=$(BITLBEE_VERSION) + dh_gencontrol -- -v$(BITLBEE_VERSION) else - dh_gencontrol -- -Vbee:Version=$(shell dpkg-parsechangelog | grep ^Version: | awk '{print $$2}' | sed -e 's/+b[0-9]\+$$//') + dh_gencontrol endif dh_md5sums dh_builddeb --- bitlbee-3.0.4+bzr855.orig/debian/skyped.docs +++ bitlbee-3.0.4+bzr855/debian/skyped.docs @@ -0,0 +1,2 @@ +protocols/skype/NEWS +protocols/skype/README --- bitlbee-3.0.4+bzr855.orig/debian/control +++ bitlbee-3.0.4+bzr855/debian/control @@ -4,14 +4,14 @@ Maintainer: Wilmer van der Gaast Uploaders: Jelmer Vernooij Standards-Version: 3.9.1 -Build-Depends: libglib2.0-dev (>= 2.4), libevent-dev, libgnutls-dev | libnss-dev (>= 1.6), po-debconf, libpurple-dev, libotr2-dev, debhelper (>= 6.0.7~) +Build-Depends: libglib2.0-dev (>= 2.4), libevent-dev, libgnutls-dev | libnss-dev (>= 1.6), po-debconf, libpurple-dev, libotr2-dev, debhelper (>= 6.0.7~), asciidoc Homepage: http://www.bitlbee.org/ Vcs-Bzr: http://code.bitlbee.org/bitlbee/ DM-Upload-Allowed: yes Package: bitlbee Architecture: any -Depends: ${misc:Depends}, ${shlibs:Depends}, debianutils (>= 1.16), bitlbee-common (= ${bee:Version}) +Depends: ${misc:Depends}, ${shlibs:Depends}, debianutils (>= 1.16), bitlbee-common (= ${source:Version}) Conflicts: bitlbee-libpurple Replaces: bitlbee-libpurple Description: An IRC to other chat networks gateway (default version) @@ -21,7 +21,7 @@ Package: bitlbee-libpurple Architecture: any -Depends: ${misc:Depends}, ${shlibs:Depends}, debianutils (>= 1.16), bitlbee-common (= ${bee:Version}) +Depends: ${misc:Depends}, ${shlibs:Depends}, debianutils (>= 1.16), bitlbee-common (= ${source:Version}) Conflicts: bitlbee Replaces: bitlbee Description: An IRC to other chat networks gateway (using libpurple) @@ -50,7 +50,7 @@ Package: bitlbee-dev Architecture: all -Depends: ${misc:Depends}, bitlbee (>= ${bee:Version}), bitlbee (<< ${bee:Version}.1~), bitlbee-common (= ${bee:Version}) +Depends: ${misc:Depends}, bitlbee (>= ${source:Version}), bitlbee (<< ${source:Version}.1~), bitlbee-common (= ${source:Version}) Description: An IRC to other chat networks gateway (dev files) This program can be used as an IRC server which forwards everything you say to people on other chat networks: Jabber (which includes Google Talk @@ -60,7 +60,7 @@ Package: bitlbee-plugin-otr Architecture: any -Depends: ${misc:Depends}, ${shlibs:Depends}, bitlbee (= ${bee:Version}) | bitlbee-libpurple (= ${bee:Version}), bitlbee-common (= ${bee:Version}) +Depends: ${misc:Depends}, ${shlibs:Depends}, bitlbee (= ${binary:Version}) | bitlbee-libpurple (= ${binary:Version}), bitlbee-common (= ${source:Version}) Description: An IRC to other chat networks gateway (OTR plugin) This program can be used as an IRC server which forwards everything you say to people on other chat networks: Jabber (which includes Google Talk @@ -68,3 +68,26 @@ . This package contains a plugin that adds support for Off-The-Record encryption of instant messages. + +Package: bitlbee-plugin-skype +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends}, bitlbee (= ${binary:Version}) | bitlbee-libpurple (= ${binary:Version}), bitlbee-common (= ${source:Version}) +Recommends: skyped +Description: An IRC to other chat networks gateway (Skype plugin) + This program can be used as an IRC server which forwards everything you + say to people on other chat networks: Jabber (which includes Google Talk + and Facebook Chat), ICQ, AIM, MSN, Yahoo! and Twitter/Identica/Status.net. + . + This package contains a plugin that adds support for the Skype IM network. + You need to download and install the Skype client for this to work. + +Package: skyped +Architecture: all +Depends: ${misc:Depends}, ${shlibs:Depends}, python (>= 2.5), python-gnutls, python-skype (>=0.9.28.7) +Recommends: skype +Description: Daemon to control Skype remotely + Daemon to control the GUI Skype client. Currently required to control Skype + from the BitlBee IRC2IM gateway. Skyped and Skype can run on a different + host than the BitlBee server, the communication is encrypted. + . + You need to download and install the Skype client for this to work. --- bitlbee-3.0.4+bzr855.orig/debian/skyped.README.Debian +++ bitlbee-3.0.4+bzr855/debian/skyped.README.Debian @@ -0,0 +1,18 @@ +bitlbee-skype for Debian +------------------------ + +The upstream package installs global configuration files in /etc. Since +configuration cannot be used by multiple users, however, the default for +Debian packages is in ~/.skyped/. Please copy the configuration files +from ./examples to ~/.skyped/. + +You will also need to change the configuration values in skyped.conf +and skyped.cnf to suit your needs and create the keys. More information +in the respective files as well as the README.gz. + +Without these measures, skyped will NOT work. + +You need to download the official skype client for this to be of any +use. Go to http://www.skype.com/. + + -- David Spreen , Thu, 2 Apr 2009 15:01:25 -0700 --- bitlbee-3.0.4+bzr855.orig/protocols/nogaim.c +++ bitlbee-3.0.4+bzr855/protocols/nogaim.c @@ -215,7 +215,7 @@ /* If we found one, include the screenname in the message. */ if( a ) /* FIXME(wilmer): ui_log callback or so */ - irc_rootmsg( ic->bee->ui_data, "%s(%s) - %s", ic->acc->prpl->name, ic->acc->user, text ); + irc_rootmsg( ic->bee->ui_data, "%s - %s", ic->acc->tag, text ); else irc_rootmsg( ic->bee->ui_data, "%s - %s", ic->acc->prpl->name, text ); --- bitlbee-3.0.4+bzr855.orig/protocols/bee.h +++ bitlbee-3.0.4+bzr855/protocols/bee.h @@ -122,7 +122,7 @@ gboolean (*chat_msg)( bee_t *bee, struct groupchat *c, bee_user_t *bu, const char *msg, time_t sent_at ); gboolean (*chat_add_user)( bee_t *bee, struct groupchat *c, bee_user_t *bu ); gboolean (*chat_remove_user)( bee_t *bee, struct groupchat *c, bee_user_t *bu ); - gboolean (*chat_topic)( bee_t *bee, struct groupchat *c, const char *new, bee_user_t *bu ); + gboolean (*chat_topic)( bee_t *bee, struct groupchat *c, const char *new_topic, bee_user_t *bu ); gboolean (*chat_name_hint)( bee_t *bee, struct groupchat *c, const char *name ); gboolean (*chat_invite)( bee_t *bee, bee_user_t *bu, const char *name, const char *msg ); --- bitlbee-3.0.4+bzr855.orig/protocols/twitter/twitter.c +++ bitlbee-3.0.4+bzr855/protocols/twitter/twitter.c @@ -92,16 +92,16 @@ } static const struct oauth_service twitter_oauth = { - "http://api.twitter.com/oauth/request_token", - "http://api.twitter.com/oauth/access_token", + "https://api.twitter.com/oauth/request_token", + "https://api.twitter.com/oauth/access_token", "https://api.twitter.com/oauth/authorize", .consumer_key = "xsDNKJuNZYkZyMcu914uEA", .consumer_secret = "FCxqcr0pXKzsF9ajmP57S3VQ8V6Drk4o2QYtqMcOszo", }; static const struct oauth_service identica_oauth = { - "http://identi.ca/api/oauth/request_token", - "http://identi.ca/api/oauth/access_token", + "https://identi.ca/api/oauth/request_token", + "https://identi.ca/api/oauth/access_token", "https://identi.ca/api/oauth/authorize", .consumer_key = "e147ff789fcbd8a5a07963afbb43f9da", .consumer_secret = "c596267f277457ec0ce1ab7bb788d828", --- bitlbee-3.0.4+bzr855.orig/protocols/msn/sb.c +++ bitlbee-3.0.4+bzr855/protocols/msn/sb.c @@ -307,7 +307,6 @@ { struct msn_switchboard *sb = data; struct im_connection *ic; - struct msn_data *md; char buf[1024]; /* Are we still alive? */ @@ -315,7 +314,6 @@ return FALSE; ic = sb->ic; - md = ic->proto_data; if( source != sb->fd ) { @@ -674,16 +672,12 @@ struct msn_switchboard *sb = handler->data; struct im_connection *ic = sb->ic; char *body; - int blen = 0; if( !num_parts ) return( 1 ); if( ( body = strstr( msg, "\r\n\r\n" ) ) ) - { body += 4; - blen = msglen - ( body - msg ); - } if( strcmp( cmd[0], "MSG" ) == 0 ) { --- bitlbee-3.0.4+bzr855.orig/protocols/msn/soap.c +++ bitlbee-3.0.4+bzr855/protocols/msn/soap.c @@ -209,7 +209,6 @@ static void msn_soap_debug_print( const char *headers, const char *payload ) { char *s; - int st; if( !getenv( "BITLBEE_DEBUG" ) ) return; @@ -217,9 +216,9 @@ if( headers ) { if( ( s = strstr( headers, "\r\n\r\n" ) ) ) - st = write( 2, headers, s - headers + 4 ); + write( 2, headers, s - headers + 4 ); else - st = write( 2, headers, strlen( headers ) ); + write( 2, headers, strlen( headers ) ); } if( payload ) --- bitlbee-3.0.4+bzr855.orig/protocols/oscar/im.c +++ bitlbee-3.0.4+bzr855/protocols/oscar/im.c @@ -918,7 +918,6 @@ { int i, ret = 0; aim_rxcallback_t userfunc; - guint8 cookie[8]; guint16 channel; aim_tlvlist_t *tlvlist; char *sn; @@ -930,7 +929,7 @@ /* ICBM Cookie. */ for (i = 0; i < 8; i++) - cookie[i] = aimbs_get8(bs); + aimbs_get8(bs); /* Channel ID */ channel = aimbs_get16(bs); @@ -1413,7 +1412,7 @@ static void incomingim_ch2_icqserverrelay(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_userinfo_t *userinfo, struct aim_incomingim_ch2_args *args, aim_bstream_t *servdata) { guint16 hdrlen, msglen, dc; - guint8 msgtype, msgflags; + guint8 msgtype; guint8 *plugin; int i = 0, tmp = 0; struct im_connection *ic = sess->aux_data; @@ -1441,7 +1440,7 @@ if (!tmp) { /* message follows */ msgtype = aimbs_getle8(servdata); - msgflags = aimbs_getle8(servdata); + aimbs_getle8(servdata); /* msgflags */ aim_bstream_advance(servdata, 0x04); /* status code and priority code */ --- bitlbee-3.0.4+bzr855.orig/protocols/oscar/icq.c +++ bitlbee-3.0.4+bzr855/protocols/oscar/icq.c @@ -234,8 +234,7 @@ aim_tlvlist_t *tl; aim_tlv_t *datatlv; aim_bstream_t qbs; - guint32 ouruin; - guint16 cmdlen, cmd, reqid; + guint16 cmd, reqid; if (!(tl = aim_readtlvchain(bs)) || !(datatlv = aim_gettlv(tl, 0x0001, 1))) { aim_freetlvchain(&tl); @@ -245,8 +244,8 @@ aim_bstream_init(&qbs, datatlv->value, datatlv->length); - cmdlen = aimbs_getle16(&qbs); - ouruin = aimbs_getle32(&qbs); + aimbs_getle16(&qbs); /* cmdlen */ + aimbs_getle32(&qbs); /* ouruin */ cmd = aimbs_getle16(&qbs); reqid = aimbs_getle16(&qbs); --- bitlbee-3.0.4+bzr855.orig/protocols/oscar/chat.c +++ bitlbee-3.0.4+bzr855/protocols/oscar/chat.c @@ -383,7 +383,6 @@ guint8 detaillevel = 0; char *roomname = NULL; struct aim_chat_roominfo roominfo; - guint16 tlvcount = 0; aim_tlvlist_t *tlvlist; char *roomdesc = NULL; guint16 flags = 0; @@ -400,7 +399,7 @@ return 1; } - tlvcount = aimbs_get16(bs); + aimbs_get16(bs); /* tlv count */ /* * Everything else are TLVs. --- bitlbee-3.0.4+bzr855.orig/protocols/oscar/service.c +++ bitlbee-3.0.4+bzr855/protocols/oscar/service.c @@ -562,9 +562,7 @@ */ groupcount = aimbs_get16(bs); for (i = 0; i < groupcount; i++) { - guint16 group; - - group = aimbs_get16(bs); + aimbs_get16(bs); imcb_error(sess->aux_data, "bifurcated migration unsupported"); } @@ -700,11 +698,10 @@ /* Host versions (group 1, subtype 0x18) */ static int hostversions(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) { - int vercount; guint8 *versions; /* This is frivolous. (Thank you SmarterChild.) */ - vercount = aim_bstream_empty(bs)/4; + aim_bstream_empty(bs); /* == vercount * 4 */ versions = aimbs_getraw(bs, aim_bstream_empty(bs)); g_free(versions); @@ -730,7 +727,6 @@ aim_snacid_t snacid; aim_tlvlist_t *tl = NULL; guint32 data; - int tlvlen; struct im_connection *ic = sess ? sess->aux_data : NULL; data = AIM_ICQ_STATE_HIDEIP | status; /* yay for error checking ;^) */ @@ -738,7 +734,7 @@ if (ic && set_getbool(&ic->acc->set, "web_aware")) data |= AIM_ICQ_STATE_WEBAWARE; - tlvlen = aim_addtlvtochain32(&tl, 0x0006, data); + aim_addtlvtochain32(&tl, 0x0006, data); /* tlvlen */ if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10 + 8))) return -ENOMEM; --- bitlbee-3.0.4+bzr855.orig/protocols/oscar/chatnav.c +++ bitlbee-3.0.4+bzr855/protocols/oscar/chatnav.c @@ -138,12 +138,8 @@ /* * Type 0x0002: Unknown */ - if (aim_gettlv(innerlist, 0x0002, 1)) { - guint16 classperms; - - classperms = aim_gettlv16(innerlist, 0x0002, 1); - - } + if (aim_gettlv(innerlist, 0x0002, 1)) + ; /* * Type 0x00c9: Flags @@ -204,9 +200,7 @@ * */ if (aim_gettlv(innerlist, 0x00d5, 1)) { - guint8 createperms; - - createperms = aim_gettlv8(innerlist, 0x00d5, 1); + aim_gettlv8(innerlist, 0x00d5, 1); /* createperms */ } /* --- bitlbee-3.0.4+bzr855.orig/protocols/oscar/rxqueue.c +++ bitlbee-3.0.4+bzr855/protocols/oscar/rxqueue.c @@ -387,10 +387,8 @@ * or we break. We must handle it just in case. */ if (aimbs_get8(&flaphdr) != 0x2a) { - guint8 start; - aim_bstream_rewind(&flaphdr); - start = aimbs_get8(&flaphdr); + aimbs_get8(&flaphdr); imcb_error(sess->aux_data, "FLAP framing disrupted"); aim_conn_close(conn); return -1; --- bitlbee-3.0.4+bzr855.orig/protocols/oscar/oscar.c +++ bitlbee-3.0.4+bzr855/protocols/oscar/oscar.c @@ -1071,12 +1071,12 @@ static void gaim_icq_authgrant(void *data_) { struct icq_auth *data = data_; - char *uin, message; + char *uin; struct oscar_data *od = (struct oscar_data *)data->ic->proto_data; uin = g_strdup_printf("%u", data->uin); - message = 0; aim_ssi_auth_reply(od->sess, od->conn, uin, 1, ""); + // char *message = 0; // aim_send_im_ch4(od->sess, uin, AIM_ICQMSG_AUTHGRANTED, &message); imcb_ask_add(data->ic, uin, NULL); @@ -1218,11 +1218,11 @@ static int gaim_parse_misses(aim_session_t *sess, aim_frame_t *fr, ...) { va_list ap; - guint16 chan, nummissed, reason; + guint16 nummissed, reason; aim_userinfo_t *userinfo; va_start(ap, fr); - chan = (guint16)va_arg(ap, unsigned int); + va_arg(ap, unsigned int); /* chan */ userinfo = va_arg(ap, aim_userinfo_t *); nummissed = (guint16)va_arg(ap, unsigned int); reason = (guint16)va_arg(ap, unsigned int); @@ -1334,13 +1334,12 @@ } static int gaim_parse_motd(aim_session_t *sess, aim_frame_t *fr, ...) { - char *msg; guint16 id; va_list ap; va_start(ap, fr); id = (guint16)va_arg(ap, unsigned int); - msg = va_arg(ap, char *); + va_arg(ap, char *); /* msg */ va_end(ap); if (id < 4) @@ -1360,13 +1359,9 @@ switch(type) { case 0x0002: { - guint8 maxrooms; - struct aim_chat_exchangeinfo *exchanges; - int exchangecount; // i; - - maxrooms = (guint8)va_arg(ap, unsigned int); - exchangecount = va_arg(ap, int); - exchanges = va_arg(ap, struct aim_chat_exchangeinfo *); + va_arg(ap, unsigned int); /* maxrooms */ + va_arg(ap, int); /* exchangecount */ + va_arg(ap, struct aim_chat_exchangeinfo *); /* exchanges */ va_end(ap); while (odata->create_rooms) { @@ -1379,21 +1374,19 @@ } break; case 0x0008: { - char *fqcn, *name, *ck; - guint16 instance, flags, maxmsglen, maxoccupancy, unknown, exchange; - guint8 createperms; - guint32 createtime; + char *ck; + guint16 instance, exchange; - fqcn = va_arg(ap, char *); + va_arg(ap, char *); /* fqcn */ instance = (guint16)va_arg(ap, unsigned int); exchange = (guint16)va_arg(ap, unsigned int); - flags = (guint16)va_arg(ap, unsigned int); - createtime = va_arg(ap, guint32); - maxmsglen = (guint16)va_arg(ap, unsigned int); - maxoccupancy = (guint16)va_arg(ap, unsigned int); - createperms = (guint8)va_arg(ap, int); - unknown = (guint16)va_arg(ap, unsigned int); - name = va_arg(ap, char *); + va_arg(ap, unsigned int); /* flags */ + va_arg(ap, guint32); /* createtime */ + va_arg(ap, unsigned int); /* maxmsglen */ + va_arg(ap, unsigned int); /* maxoccupancy */ + va_arg(ap, int); /* createperms */ + va_arg(ap, unsigned int); /* unknown */ + va_arg(ap, char *); /* name */ ck = va_arg(ap, char *); va_end(ap); @@ -1455,27 +1448,21 @@ static int gaim_chat_info_update(aim_session_t *sess, aim_frame_t *fr, ...) { va_list ap; - aim_userinfo_t *userinfo; - struct aim_chat_roominfo *roominfo; - char *roomname; - int usercount; - char *roomdesc; - guint16 unknown_c9, unknown_d2, unknown_d5, maxmsglen, maxvisiblemsglen; - guint32 creationtime; + guint16 maxmsglen, maxvisiblemsglen; struct im_connection *ic = sess->aux_data; struct chat_connection *ccon = find_oscar_chat_by_conn(ic, fr->conn); va_start(ap, fr); - roominfo = va_arg(ap, struct aim_chat_roominfo *); - roomname = va_arg(ap, char *); - usercount= va_arg(ap, int); - userinfo = va_arg(ap, aim_userinfo_t *); - roomdesc = va_arg(ap, char *); - unknown_c9 = (guint16)va_arg(ap, int); - creationtime = (guint32)va_arg(ap, unsigned long); + va_arg(ap, struct aim_chat_roominfo *); /* roominfo */ + va_arg(ap, char *); /* roomname */ + va_arg(ap, int); /* usercount */ + va_arg(ap, aim_userinfo_t *); /* userinfo */ + va_arg(ap, char *); /* roomdesc */ + va_arg(ap, int); /* unknown_c9 */ + va_arg(ap, unsigned long); /* creationtime */ maxmsglen = (guint16)va_arg(ap, int); - unknown_d2 = (guint16)va_arg(ap, int); - unknown_d5 = (guint16)va_arg(ap, int); + va_arg(ap, int); /* unknown_d2 */ + va_arg(ap, int); /* unknown_d5 */ maxvisiblemsglen = (guint16)va_arg(ap, int); va_end(ap); @@ -1516,19 +1503,19 @@ }; #endif va_list ap; - guint16 code, rateclass; - guint32 windowsize, clear, alert, limit, disconnect, currentavg, maxavg; + guint16 code; + guint32 windowsize, clear, currentavg; va_start(ap, fr); code = (guint16)va_arg(ap, unsigned int); - rateclass= (guint16)va_arg(ap, unsigned int); + va_arg(ap, unsigned int); /* rateclass */ windowsize = (guint32)va_arg(ap, unsigned long); clear = (guint32)va_arg(ap, unsigned long); - alert = (guint32)va_arg(ap, unsigned long); - limit = (guint32)va_arg(ap, unsigned long); - disconnect = (guint32)va_arg(ap, unsigned long); + va_arg(ap, unsigned long); /* alert */ + va_arg(ap, unsigned long); /* limit */ + va_arg(ap, unsigned long); /* disconnect */ currentavg = (guint32)va_arg(ap, unsigned long); - maxavg = (guint32)va_arg(ap, unsigned long); + va_arg(ap, unsigned long); /* maxavg */ va_end(ap); /* XXX fix these values */ @@ -2416,11 +2403,11 @@ { struct im_connection * ic = sess->aux_data; va_list ap; - guint16 type1, type2; + guint16 type2; char * sn; va_start(ap, fr); - type1 = va_arg(ap, int); + va_arg(ap, int); /* type1 */ sn = va_arg(ap, char*); type2 = va_arg(ap, int); va_end(ap); @@ -2540,9 +2527,7 @@ aim_conn_t * cur; if((cur = aim_getconn_type(od->sess, AIM_CONN_TYPE_CHATNAV))) { - int st; - - st = aim_chatnav_createroom(od->sess, cur, room, exchange_number); + aim_chatnav_createroom(od->sess, cur, room, exchange_number); return ret; } else { @@ -2569,7 +2554,6 @@ struct groupchat *ret; static int chat_id = 0; char * chatname, *s; - struct groupchat *c; chatname = g_strdup_printf("%s%s%d", isdigit(*ic->acc->user) ? "icq" : "", ic->acc->user, chat_id++); @@ -2578,13 +2562,12 @@ if (!isalnum(*s)) *s = '0'; - c = imcb_chat_new(ic, chatname); ret = oscar_chat_join_internal(ic, chatname, NULL, NULL, 4); aim_chat_invite(od->sess, od->conn, who, "", 4, chatname, 0x0); g_free(chatname); - return NULL; + return ret; } void oscar_accept_chat(void *data) --- bitlbee-3.0.4+bzr855.orig/protocols/oscar/misc.c +++ bitlbee-3.0.4+bzr855/protocols/oscar/misc.c @@ -309,7 +309,6 @@ int aim_setuserinterests(aim_session_t *sess, aim_conn_t *conn, const char *interest1, const char *interest2, const char *interest3, const char *interest4, const char *interest5, guint16 privacy) { aim_frame_t *fr; - aim_snacid_t snacid; aim_tlvlist_t *tl = NULL; /* ?? privacy ?? */ @@ -329,7 +328,7 @@ if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+aim_sizetlvchain(&tl)))) return -ENOMEM; - snacid = aim_cachesnac(sess, 0x0002, 0x000f, 0x0000, NULL, 0); + aim_cachesnac(sess, 0x0002, 0x000f, 0x0000, NULL, 0); aim_putsnac(&fr->data, 0x0002, 0x000f, 0x0000, 0); aim_writetlvchain(&fr->data, &tl); --- bitlbee-3.0.4+bzr855.orig/protocols/purple/purple.c +++ bitlbee-3.0.4+bzr855/protocols/purple/purple.c @@ -749,6 +749,8 @@ if( bud->server_alias ) imcb_rename_buddy( ic, bud->name, bud->server_alias ); + else if( bud->alias ) + imcb_rename_buddy( ic, bud->name, bud->alias ); if( group ) imcb_add_buddy( ic, bud->name, purple_group_get_name( group ) ); --- bitlbee-3.0.4+bzr855.orig/protocols/jabber/io.c +++ bitlbee-3.0.4+bzr855/protocols/jabber/io.c @@ -211,7 +211,7 @@ /* If there's no version attribute, assume this is an old server that can't do SASL authentication. */ - if( !sasl_supported( ic ) ) + if( !set_getbool( &ic->acc->set, "sasl") || !sasl_supported( ic ) ) { /* If there's no version= tag, we suppose this server does NOT implement: XMPP 1.0, @@ -374,7 +374,7 @@ support it after all, we should try to do authentication the other way. jabber.com doesn't seem to do SASL while it pretends to be XMPP 1.0 compliant! */ - else if( !( jd->flags & JFLAG_AUTHENTICATED ) && sasl_supported( ic ) ) + else if( !( jd->flags & JFLAG_AUTHENTICATED ) && set_getbool( &ic->acc->set, "sasl") && sasl_supported( ic ) ) { if( !jabber_init_iq_auth( ic ) ) return XT_ABORT; --- bitlbee-3.0.4+bzr855.orig/protocols/jabber/jabber.c +++ bitlbee-3.0.4+bzr855/protocols/jabber/jabber.c @@ -81,6 +81,9 @@ s = set_add( &acc->set, "tls", "try", set_eval_tls, acc ); s->flags |= ACC_SET_OFFLINE_ONLY; + s = set_add( &acc->set, "sasl", "true", set_eval_bool, acc ); + s->flags |= ACC_SET_OFFLINE_ONLY | SET_HIDDEN_DEFAULT; + s = set_add( &acc->set, "user_agent", "BitlBee", NULL, acc ); s = set_add( &acc->set, "xmlconsole", "false", set_eval_bool, acc ); --- bitlbee-3.0.4+bzr855.orig/protocols/skype/skyped.py +++ bitlbee-3.0.4+bzr855/protocols/skype/skyped.py @@ -197,11 +197,15 @@ 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() --- bitlbee-3.0.4+bzr855.orig/protocols/skype/Makefile +++ bitlbee-3.0.4+bzr855/protocols/skype/Makefile @@ -1,12 +1,14 @@ -include ../../Makefile.settings ifdef SRCDIR -SRCDIR := $(SRCDIR)protocls/skype/ +SRCDIR := $(SRCDIR)protocols/skype/ endif 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 @@ -22,16 +24,12 @@ 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 -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) @@ -46,7 +44,7 @@ $(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 +54,7 @@ rm -f $(LIBS) $(MANPAGES) distclean: clean - rm -f config.log config.mak config.status + rm -f config.log config.mak config.status $(MANPAGES) autoclean: distclean rm -rf aclocal.m4 autom4te.cache configure install-sh @@ -82,11 +80,13 @@ 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* @@ -102,6 +102,6 @@ AUTHORS: .git/refs/heads/master git shortlog -s -n |sed 's/.*\t//'> AUTHORS -%.1: %.txt asciidoc.conf - a2x --asciidoc-opts="-f asciidoc.conf" \ - -a bs_version=$(VERSION) -a bs_date=$(DATE) -f manpage $< +%.1: $(SRCDIR)%.txt $(SRCDIR)asciidoc.conf + a2x --asciidoc-opts="-f $(SRCDIR)asciidoc.conf" \ + -a bs_version=$(VERSION) -a bs_date=$(DATE) -f manpage -D . $< --- bitlbee-3.0.4+bzr855.orig/protocols/yahoo/libyahoo2.c +++ bitlbee-3.0.4+bzr855/protocols/yahoo/libyahoo2.c @@ -1808,7 +1808,6 @@ { struct yahoo_input_data *yid = had->yid; struct yahoo_data *yd = yid->yd; - struct http_request *req; char *login, *passwd, *chal; char *url; @@ -1822,7 +1821,7 @@ url = g_strdup_printf("https://login.yahoo.com/config/pwtoken_get?src=ymsgr&ts=%d&login=%s&passwd=%s&chal=%s", (int) time(NULL), login, passwd, chal); - req = http_dorequest_url(url, yahoo_https_auth_token_finish, had); + http_dorequest_url(url, yahoo_https_auth_token_finish, had); g_free(url); g_free(chal); @@ -1869,13 +1868,12 @@ static void yahoo_https_auth_init(struct yahoo_https_auth_data *had) { - struct http_request *req; char *url; url = g_strdup_printf("https://login.yahoo.com/config/pwtoken_login?src=ymsgr&ts=%d&token=%s", (int) time(NULL), had->token); - req = http_dorequest_url(url, yahoo_https_auth_finish, had); + http_dorequest_url(url, yahoo_https_auth_finish, had); g_free(url); } @@ -1989,8 +1987,6 @@ struct yahoo_packet *pkt) { struct yahoo_data *yd = yid->yd; - char *login_id; - char *handle; char *url = NULL; int login_status = -1; @@ -1999,9 +1995,9 @@ for (l = pkt->hash; l; l = l->next) { struct yahoo_pair *pair = l->data; if (pair->key == 0) - login_id = pair->value; + ; /* login_id */ else if (pair->key == 1) - handle = pair->value; + ; /* handle */ else if (pair->key == 20) url = pair->value; else if (pair->key == 66) @@ -2088,9 +2084,7 @@ char *who = NULL; char *msg = NULL; char *name = NULL; - long tm = 0L; int state = YAHOO_STATUS_AVAILABLE; - int online = 0; int away = 0; int idle = 0; int mobile = 0; @@ -2110,9 +2104,9 @@ else if (pair->key == 10) state = strtol(pair->value, NULL, 10); else if (pair->key == 15) - tm = strtol(pair->value, NULL, 10); + ; /* tm */ else if (pair->key == 13) - online = strtol(pair->value, NULL, 10); + ; /* online */ else if (pair->key == 47) away = strtol(pair->value, NULL, 10); else if (pair->key == 137) @@ -2139,7 +2133,6 @@ char *who = NULL; char *where = NULL; int status = 0; - char *me = NULL; struct yahoo_buddy *bud = NULL; @@ -2147,7 +2140,7 @@ for (l = pkt->hash; l; l = l->next) { struct yahoo_pair *pair = l->data; if (pair->key == 1) - me = pair->value; + ; /* Me... don't care */ if (pair->key == 7) who = pair->value; if (pair->key == 65) @@ -2203,8 +2196,6 @@ struct yahoo_data *yd = yid->yd; char *who = NULL; char *where = NULL; - int unk_66 = 0; - char *me = NULL; struct yahoo_buddy *bud; YList *buddy; @@ -2213,13 +2204,13 @@ for (l = pkt->hash; l; l = l->next) { struct yahoo_pair *pair = l->data; if (pair->key == 1) - me = pair->value; + ; /* Me... don't care */ else if (pair->key == 7) who = pair->value; else if (pair->key == 65) where = pair->value; else if (pair->key == 66) - unk_66 = strtol(pair->value, NULL, 10); + ; /* unk_66 */ else DEBUG_MSG(("unknown key: %d = %s", pair->key, pair->value)); @@ -2255,22 +2246,17 @@ static void yahoo_process_ignore(struct yahoo_input_data *yid, struct yahoo_packet *pkt) { - char *who = NULL; - int status = 0; - char *me = NULL; - int un_ignore = 0; - YList *l; for (l = pkt->hash; l; l = l->next) { struct yahoo_pair *pair = l->data; if (pair->key == 0) - who = pair->value; + ; /* who */ if (pair->key == 1) - me = pair->value; + ; /* Me... don't care */ if (pair->key == 13) /* 1 == ignore, 2 == unignore */ - un_ignore = strtol(pair->value, NULL, 10); + ; if (pair->key == 66) - status = strtol(pair->value, NULL, 10); + ; /* status */ } /* @@ -2292,7 +2278,6 @@ char *who = NULL; char *me = NULL; char *room = NULL; - char *voice_room = NULL; YList *l; for (l = pkt->hash; l; l = l->next) { @@ -2302,7 +2287,7 @@ if (pair->key == 5) me = pair->value; if (pair->key == 13) - voice_room = pair->value; + ; /* voice room */ if (pair->key == 57) room = pair->value; } @@ -2437,7 +2422,6 @@ static void yahoo_process_webcam_key(struct yahoo_input_data *yid, struct yahoo_packet *pkt) { - char *me = NULL; char *key = NULL; char *who = NULL; @@ -2446,7 +2430,7 @@ for (l = pkt->hash; l; l = l->next) { struct yahoo_pair *pair = l->data; if (pair->key == 5) - me = pair->value; + ; /* me */ if (pair->key == 61) key = pair->value; } @@ -3368,7 +3352,6 @@ { struct yahoo_webcam *wcm = y->wcm; struct yahoo_input_data *yid; - struct yahoo_server_settings *yss; if (!wcm || !wcm->server || !wcm->key) return; @@ -3381,8 +3364,6 @@ yid->wcm = y->wcm; y->wcm = NULL; - yss = y->yd->server_settings; - yid->wcd = y_new0(struct yahoo_webcam_data, 1); LOG(("Connecting to: %s:%d", wcm->server, wcm->port)); @@ -4974,8 +4955,6 @@ { YList *l; struct send_file_data *sfd; - char *who = NULL; - char *filename = NULL; char *id = NULL; char *token = NULL; @@ -4983,7 +4962,7 @@ struct yahoo_pair *pair = l->data; switch (pair->key) { case 4: - who = pair->value; + /* who */ break; case 5: /* Me... don't care */ @@ -4997,7 +4976,7 @@ token = pair->value; break; case 27: - filename = pair->value; + /* filename */ break; } } @@ -5022,8 +5001,6 @@ struct yahoo_packet *pkt) { YList *l; - char *who = NULL; - char *filename = NULL; char *id = NULL; char *token = NULL; char *ip_addr = NULL; @@ -5035,7 +5012,7 @@ switch (pair->key) { case 1: case 4: - who = pair->value; + /* who */ break; case 5: /* Me... don't care */ @@ -5052,7 +5029,7 @@ token = pair->value; break; case 27: - filename = pair->value; + /* filename */ break; } } --- bitlbee-3.0.4+bzr855.orig/lib/http_client.c +++ bitlbee-3.0.4+bzr855/lib/http_client.c @@ -69,6 +69,9 @@ req->request_length = strlen( request ); req->redir_ttl = 3; + if( getenv( "BITLBEE_DEBUG" ) ) + printf( "About to send HTTP request:\n%s\n", req->request ); + return( req ); } @@ -279,7 +282,7 @@ *end1 = 0; if( getenv( "BITLBEE_DEBUG" ) ) - printf( "HTTP response headers:\n%s", req->reply_headers ); + printf( "HTTP response headers:\n%s\n", req->reply_headers ); if( evil_server ) req->reply_body = end1 + 1; @@ -319,7 +322,8 @@ req->status_code = -1; } - if( ( req->status_code >= 301 && req->status_code <= 303 ) && req->redir_ttl-- > 0 ) + if( ( ( req->status_code >= 301 && req->status_code <= 303 ) || + req->status_code == 307 ) && req->redir_ttl-- > 0 ) { char *loc, *new_request, *new_host; int error = 0, new_port, new_proto; @@ -390,8 +394,20 @@ /* More or less HTTP/1.0 compliant, from my reading of RFC 2616. Always perform a GET request unless we received a 301. 303 was meant for this but it's HTTP/1.1-only and we're specifically - speaking HTTP/1.0. */ - new_method = req->status_code != 301 || req->request[0] == 'G' ? "GET" : "POST"; + speaking HTTP/1.0. ... + + Well except someone at identi.ca's didn't bother reading any + RFCs and just return HTTP/1.1-specific status codes to HTTP/1.0 + requests. Fuckers. So here we are, handle 301..303,307. */ + if( strncmp( req->request, "GET", 3 ) == 0 ) + /* GETs never become POSTs. */ + new_method = "GET"; + else if( req->status_code == 302 || req->status_code == 303 ) + /* 302 de-facto becomes GET, 303 as specified by RFC 2616#10.3.3 */ + new_method = "GET"; + else + /* 301 de-facto should stay POST, 307 specifally RFC 2616#10.3.8 */ + new_method = "POST"; /* Okay, this isn't fun! We have to rebuild the request... :-( */ new_request = g_strdup_printf( "%s %s HTTP/1.0\r\nHost: %s%s", @@ -418,7 +434,7 @@ req->ssl = NULL; if( getenv( "BITLBEE_DEBUG" ) ) - printf( "New headers for redirected HTTP request:\n%s", new_request ); + printf( "New headers for redirected HTTP request:\n%s\n", new_request ); if( new_proto == PROTO_HTTPS ) { @@ -462,7 +478,7 @@ closesocket( req->fd ); if( getenv( "BITLBEE_DEBUG" ) && req ) - printf( "Finishing HTTP request with status: %s", + printf( "Finishing HTTP request with status: %s\n", req->status_string ? req->status_string : "NULL" ); req->func( req ); --- bitlbee-3.0.4+bzr855.orig/lib/events_glib.c +++ bitlbee-3.0.4+bzr855/lib/events_glib.c @@ -74,6 +74,9 @@ GaimIOClosure *closure = data; b_input_condition gaim_cond = 0; gboolean st; + + if (condition & G_IO_NVAL) + return FALSE; if (condition & GAIM_READ_COND) gaim_cond |= B_EV_IO_READ; --- bitlbee-3.0.4+bzr855.orig/doc/user-guide/help.txt +++ bitlbee-3.0.4+bzr855/doc/user-guide/help.txt @@ -526,7 +526,7 @@ % ?set auto_connect Type: boolean -Scope: both +Scope: account,global Default: true With this option enabled, when you identify BitlBee will automatically connect to your accounts, with this disabled it will not do this. @@ -542,7 +542,7 @@ % ?set auto_reconnect Type: boolean -Scope: both +Scope: account,global Default: true If an IM-connections breaks, you're supposed to bring it back up yourself. Having BitlBee do this automatically might not always be a good idea, for several reasons. If you want the connections to be restored automatically, you can enable this setting. @@ -575,7 +575,7 @@ % ?set away Type: string -Scope: both +Scope: account,global To mark yourself as away, it is recommended to just use /away, like on normal IRC networks. If you want to mark yourself as away on only one IM network, you can use this per-account setting. @@ -800,7 +800,7 @@ % ?set nick_format Type: string -Scope: both +Scope: account,global Default: %-@nick By default, BitlBee tries to derive sensible nicknames for all your contacts from their IM handles. In some cases, IM modules (ICQ for example) will provide a nickname suggestion, which will then be used instead. This setting lets you change this behaviour. @@ -858,7 +858,7 @@ % ?set password Type: string -Scope: both +Scope: account,global Use this global setting to change your "NickServ" password. @@ -1004,13 +1004,13 @@ % ?set status Type: string -Scope: both +Scope: account,global -Certain protocols (like Jabber/XMPP) support status messages, similar to away messages. They can be used to indicate things like your location or activity, without showing up as away/busy. +Most IM protocols support status messages, similar to away messages. They can be used to indicate things like your location or activity, without showing up as away/busy. This setting can be used to set such a message. It will be available as a per-account setting for protocols that support it, and also as a global setting (which will then automatically be used for all protocols that support it). -Away states set using /away or the away setting will override this setting. To un-set the setting, use set -del status. +Away states set using /away or the away setting will override this setting. To clear the setting, use set -del status. % ?set strip_html Type: boolean --- bitlbee-3.0.4+bzr855.orig/doc/user-guide/user-guide.txt +++ bitlbee-3.0.4+bzr855/doc/user-guide/user-guide.txt @@ -1692,16 +1692,16 @@ Type: string -Certain protocols (like Jabber/XMPP) support status messages, similar to away -messages. They can be used to indicate things like your location or activity, -without showing up as away/busy. +Most IM protocols support status messages, similar to away messages. They can +be used to indicate things like your location or activity, without showing up +as away/busy. This setting can be used to set such a message. It will be available as a per-account setting for protocols that support it, and also as a global setting (which will then automatically be used for all protocols that support it). Away states set using /away or the away setting will override this setting. To -un-set the setting, use set -del status. +clear the setting, use set -del status. strip_html --- bitlbee-3.0.4+bzr855.orig/doc/user-guide/user-guide.html +++ bitlbee-3.0.4+bzr855/doc/user-guide/user-guide.html @@ -5,12 +5,12 @@ the most up-to-date documentation. Although this document shares some parts with the on-line help system, other parts might be very outdated. -


Table of Contents

1. Installation
Downloading the package
Compiling
Configuration
2. Usage
Connecting to the server
The &bitlbee control channel
Talking to people
3. Support
Disclaimer
Support channels
The World Wide Web
IRC
Mailinglists
4. Quickstart
Add and Connect To your IM Account(s)
Step Four: Managing Contact Lists: Add, Remove and Rename
Chatting
Further Resources
5. Bitlbee commands
account - IM-account list maintenance
account add
account del
account on
account off
account list
account set
channel - Channel list maintenance
channel del
channel list
channel set
chat - Chatroom list maintenance
chat add
chat with
add - Add a buddy to your contact list
info - Request user information
remove - Remove a buddy from your contact list
block - Block someone
allow - Unblock someone
otr - Off-the-Record encryption control
otr connect
otr disconnect
otr reconnect
otr smp
otr smpq
otr trust
otr info
otr keygen
otr forget
set - Miscellaneous settings
help - BitlBee help system
save - Save your account data
account
allow_takeover
auto_connect
auto_join
auto_reconnect
auto_reconnect_delay
auto_reply_timeout
away
away_devoice
away_reply_timeout
base_url
charset
color_encrypted
control_channel
chat_type
commands
debug
default_target
display_name
display_namechanges
display_timestamps
fill_by
group
handle_unknown
ignore_auth_requests
lcnicks
local_display_name
mail_notifications
message_length
mode
mobile_is_away
nick
nick_format
nick_source
oauth
ops
otr_policy
password
paste_buffer
paste_buffer_delay
port
priority
private
protocol
query_order
resource
resource_select
root_nick
save_on_quit
server
show_ids
show_offline
show_users
simulate_netsplit
ssl
status
strip_html
switchboard_keepalives
tag
timezone
tls
to_char
translate_to_nicks
type
typing_notice
user_agent
web_aware
xmlconsole
rename - Rename (renick) a buddy
yes - Accept a request
no - Deny a request
qlist - List all the unanswered questions root asked
register - Register yourself
identify - Identify yourself with your password
drop - Drop your account
blist - List all the buddies in the current channel
group - Contact group management
transfer - Monitor, cancel, or reject file transfers
transfer cancel - Cancels the file transfer with the given id
transfer reject - Rejects all incoming transfers
6. Misc Stuff
Smileys
Groupchats
Creating groupchats
Away states
Changing your nickname
Dealing with channels
Creating a channel
Configuring a control channel
Nickname formatting
Nickname formatting - modifiers
New stuff in BitlBee 1.2.6
New stuff in BitlBee 1.3dev
New stuff in BitlBee 3.0
New stuff in BitlBee 1.3dev (details)

Chapter 1. Installation

Downloading the package

+


Table of Contents

1. Installation
Downloading the package
Compiling
Configuration
2. Usage
Connecting to the server
The &bitlbee control channel
Talking to people
3. Support
Disclaimer
Support channels
The World Wide Web
IRC
Mailinglists
4. Quickstart
Add and Connect To your IM Account(s)
Step Four: Managing Contact Lists: Add, Remove and Rename
Chatting
Further Resources
5. Bitlbee commands
account - IM-account list maintenance
account add
account del
account on
account off
account list
account set
channel - Channel list maintenance
channel del
channel list
channel set
chat - Chatroom list maintenance
chat add
chat with
add - Add a buddy to your contact list
info - Request user information
remove - Remove a buddy from your contact list
block - Block someone
allow - Unblock someone
otr - Off-the-Record encryption control
otr connect
otr disconnect
otr reconnect
otr smp
otr smpq
otr trust
otr info
otr keygen
otr forget
set - Miscellaneous settings
help - BitlBee help system
save - Save your account data
account
allow_takeover
auto_connect
auto_join
auto_reconnect
auto_reconnect_delay
auto_reply_timeout
away
away_devoice
away_reply_timeout
base_url
charset
color_encrypted
control_channel
chat_type
commands
debug
default_target
display_name
display_namechanges
display_timestamps
fill_by
group
handle_unknown
ignore_auth_requests
lcnicks
local_display_name
mail_notifications
message_length
mode
mobile_is_away
nick
nick_format
nick_source
oauth
ops
otr_policy
password
paste_buffer
paste_buffer_delay
port
priority
private
protocol
query_order
resource
resource_select
root_nick
save_on_quit
server
show_ids
show_offline
show_users
simulate_netsplit
ssl
status
strip_html
switchboard_keepalives
tag
timezone
tls
to_char
translate_to_nicks
type
typing_notice
user_agent
web_aware
xmlconsole
rename - Rename (renick) a buddy
yes - Accept a request
no - Deny a request
qlist - List all the unanswered questions root asked
register - Register yourself
identify - Identify yourself with your password
drop - Drop your account
blist - List all the buddies in the current channel
group - Contact group management
transfer - Monitor, cancel, or reject file transfers
transfer cancel - Cancels the file transfer with the given id
transfer reject - Rejects all incoming transfers
6. Misc Stuff
Smileys
Groupchats
Creating groupchats
Away states
Changing your nickname
Dealing with channels
Creating a channel
Configuring a control channel
Nickname formatting
Nickname formatting - modifiers
New stuff in BitlBee 1.2.6
New stuff in BitlBee 1.3dev
New stuff in BitlBee 3.0
New stuff in BitlBee 1.3dev (details)

Chapter 1. Installation

Downloading the package

The latest BitlBee release is always available from http://www.bitlbee.org/. Download the package with your favorite program and unpack it: tar xvfz bitlbee-<version>.tar.gz where <version> is to be replaced by the version number of the BitlBee you downloaded (e.g. 0.91). -

Compiling

+

Compiling

BitlBee's build system has to be configured before compiling. The configure script will do this for you. Just run it, it'll set up with nice and hopefully well-working defaults. If you @@ -42,7 +42,7 @@ After running configure, you should run make. After that, run make install as root. -

Configuration

+

Configuration

By default, BitlBee runs as the user nobody. You might want to run it as a seperate user (some computers run named or apache as nobody).

@@ -70,11 +70,11 @@ 'nobody' owner of this directory, run chown nobody /var/lib/bitlbee. Because things like passwords are saved in this directory, it's probably a good idea to make this directory owner-read-/writable only. -

Chapter 2. Usage

Connecting to the server

+

Chapter 2. Usage

Connecting to the server

Since BitlBee acts just like any other irc daemon, you can connect to it with your favorite irc client. Launch it and connect to localhost port 6667 (or whatever host/port you are running bitlbee on). -

The &bitlbee control channel

+

The &bitlbee control channel

Once you are connected to the BitlBee server, you are automatically joined to &bitlbee on that server. This channel acts like the 'buddy list' you have on the various other chat networks. @@ -90,24 +90,24 @@ the BitlBee control channel is local to one server (and in fact, to one person), this name seems more suitable. Also, with this name, it's harder to confuse the control channel with the #bitlbee channel on OFTC. -

Talking to people

+

Talking to people

You can talk to by starting a query with them. In most irc clients, this can be done with either /msg <nick> <text> or /query <nick>.

To keep the number of open query windows limited, you can also talk to people in the control channel, like <nick>: <text>. -

Chapter 3. Support

Disclaimer

+

Chapter 3. Support

Disclaimer

BitlBee doesn't come with a warranty and is still (and will probably always be) under development. That means it can crash at any time, corrupt your data or whatever. Don't use it in any production environment and don't rely on it, or at least don't blame us if things blow up. :-) -

Support channels

The World Wide Web

http://www.bitlbee.org/ +

Support channels

The World Wide Web

http://www.bitlbee.org/ is the homepage of bitlbee and contains the most recent news on bitlbee and the latest releases. -

IRC

+

IRC

BitlBee is discussed on #bitlbee on the OFTC IRC network (server: irc.oftc.net). -

Mailinglists

+

Mailinglists

BitlBee doesn't have any mailinglists.

Chapter 4. Quickstart

Welcome to BitlBee, your IRC gateway to ICQ, MSN, AOL, Jabber, Yahoo! and Twitter. @@ -658,11 +658,11 @@

ssl

Type: boolean

Currently only available for Jabber connections. Set this to true if the server accepts SSL connections.

status

Type: string

- Certain protocols (like Jabber/XMPP) support status messages, similar to away messages. They can be used to indicate things like your location or activity, without showing up as away/busy. + Most IM protocols support status messages, similar to away messages. They can be used to indicate things like your location or activity, without showing up as away/busy.

This setting can be used to set such a message. It will be available as a per-account setting for protocols that support it, and also as a global setting (which will then automatically be used for all protocols that support it).

- Away states set using /away or the away setting will override this setting. To un-set the setting, use set -del status. + Away states set using /away or the away setting will override this setting. To clear the setting, use set -del status.

strip_html

Type: boolean

Determines what BitlBee should do with HTML in messages. Normally this is turned on and HTML will be stripped from messages, if BitlBee thinks there is HTML.

--- bitlbee-3.0.4+bzr855.orig/doc/user-guide/commands.xml +++ bitlbee-3.0.4+bzr855/doc/user-guide/commands.xml @@ -647,7 +647,7 @@ - + true @@ -671,7 +671,7 @@ - + true @@ -725,7 +725,7 @@ - + To mark yourself as away, it is recommended to just use /away, like on normal IRC networks. If you want to mark yourself as away on only one IM network, you can use this per-account setting. @@ -1075,7 +1075,7 @@ - + %-@nick @@ -1168,7 +1168,7 @@ - + Use this global setting to change your "NickServ" password. @@ -1396,10 +1396,10 @@ - + - Certain protocols (like Jabber/XMPP) support status messages, similar to away messages. They can be used to indicate things like your location or activity, without showing up as away/busy. + Most IM protocols support status messages, similar to away messages. They can be used to indicate things like your location or activity, without showing up as away/busy. @@ -1407,7 +1407,7 @@ - Away states set using /away or the away setting will override this setting. To un-set the setting, use set -del status. + Away states set using /away or the away setting will override this setting. To clear the setting, use set -del status.