aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitlbee.h4
-rw-r--r--debian/changelog6
-rw-r--r--doc/CHANGES19
-rw-r--r--doc/user-guide/commands.xml18
-rw-r--r--lib/http_client.c10
-rw-r--r--lib/http_client.h8
-rw-r--r--protocols/oscar/oscar.c2
-rw-r--r--protocols/twitter/twitter_lib.c17
-rw-r--r--storage_xml.c20
9 files changed, 90 insertions, 14 deletions
diff --git a/bitlbee.h b/bitlbee.h
index 9b35810f..10261c8a 100644
--- a/bitlbee.h
+++ b/bitlbee.h
@@ -34,10 +34,10 @@
#define _WIN32_WINNT 0x0501
#define PACKAGE "BitlBee"
-#define BITLBEE_VERSION "1.2.7"
+#define BITLBEE_VERSION "1.2.8"
#define VERSION BITLBEE_VERSION
#define BITLBEE_VER(a,b,c) (((a) << 16) + ((b) << 8) + (c))
-#define BITLBEE_VERSION_CODE BITLBEE_VER(1, 2, 7)
+#define BITLBEE_VERSION_CODE BITLBEE_VER(1, 2, 8)
#define MAX_STRING 511
diff --git a/debian/changelog b/debian/changelog
index 4bcaa5d0..70f1ed47 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,12 @@ bitlbee (1.3-0) unstable; urgency=low
-- Wilmer van der Gaast <wilmer@gaast.net> Sat, 05 Jun 2010 15:16:38 +0100
+bitlbee (1.2.8-1) unstable; urgency=low
+
+ * New upstream version.
+
+ -- Wilmer van der Gaast <wilmer@gaast.net> Sat, 10 Jul 2010 13:54:55 +0100
+
bitlbee (1.2.7-1) unstable; urgency=high
* New upstream version.
diff --git a/doc/CHANGES b/doc/CHANGES
index 7359a050..25db8a70 100644
--- a/doc/CHANGES
+++ b/doc/CHANGES
@@ -3,6 +3,25 @@ found in the bzr commit logs, for example you can try:
http://bugs.bitlbee.org/bitlbee/timeline?daysback=90&changeset=on
+Version 1.2.8:
+- Now always using the AIM-style authentication method for OSCAR connections,
+ even when connecting to ICQ. This solves login issues some people were
+ having. (If you have problems, try changing the old_icq_auth setting.)
+- Twitter:
+ * Allow changing the Twitter API base URL so the module can also be used
+ for identi.ca or any other compatible network.
+ * Fetch the full list of Twitter contacts instead of slowly adding all
+ contacts as they post a message.
+ * Fixed message length counting.
+ * Allow following/unfollowing people using the usual add/remove commands.
+ * Better error reporting.
+- Added a user_agent setting to the Jabber module to get around artificial
+ client restrictions.
+- Allow nick changes (although only before register/identify).
+- Some more minor bugfixes/etc.
+
+Finished 4 Jul 2010
+
Version 1.2.7:
- Fixed problems with MSN Messenger authentication. ("Could not parse
Passport server response")
diff --git a/doc/user-guide/commands.xml b/doc/user-guide/commands.xml
index d0ce485e..46d12a9c 100644
--- a/doc/user-guide/commands.xml
+++ b/doc/user-guide/commands.xml
@@ -530,6 +530,24 @@
</description>
</bitlbee-setting>
+ <bitlbee-setting name="base_url" type="string" scope="account">
+ <default>http://twitter.com</default>
+
+ <description>
+ <para>
+ There are more services that understand the Twitter API than just Twitter.com. BitlBee can connect to all Twitter API implementations.
+ </para>
+
+ <para>
+ For example, set this setting to <emphasis>http://identi.ca/api</emphasis> to use Identi.ca.
+ </para>
+
+ <para>
+ Keep two things in mind: When not using Twitter, you <emphasis>must</emphasis> also disable the <emphasis>oauth</emphasis> setting as it currently only works with Twitter. If you're still having issues, make sure there is <emphasis>no</emphasis> slash at the end of the URL you enter here.
+ </para>
+ </description>
+ </bitlbee-setting>
+
<bitlbee-setting name="charset" type="string" scope="global">
<default>utf-8</default>
<possible-values>you can get a list of all possible values by doing 'iconv -l' in a shell</possible-values>
diff --git a/lib/http_client.c b/lib/http_client.c
index e9d3c1bb..69f06ec5 100644
--- a/lib/http_client.c
+++ b/lib/http_client.c
@@ -34,9 +34,10 @@
static gboolean http_connected( gpointer data, int source, b_input_condition cond );
static gboolean http_ssl_connected( gpointer data, void *source, b_input_condition cond );
static gboolean http_incoming_data( gpointer data, int source, b_input_condition cond );
+static void http_free( struct http_request *req );
-void *http_dorequest( char *host, int port, int ssl, char *request, http_input_function func, gpointer data )
+struct http_request *http_dorequest( char *host, int port, int ssl, char *request, http_input_function func, gpointer data )
{
struct http_request *req;
int error = 0;
@@ -66,11 +67,12 @@ void *http_dorequest( char *host, int port, int ssl, char *request, http_input_f
req->data = data;
req->request = g_strdup( request );
req->request_length = strlen( request );
+ req->redir_ttl = 3;
return( req );
}
-void *http_dorequest_url( char *url_string, http_input_function func, gpointer data )
+struct http_request *http_dorequest_url( char *url_string, http_input_function func, gpointer data )
{
url_t *url = g_new0( url_t, 1 );
char *request;
@@ -310,7 +312,7 @@ got_reply:
req->status_code = -1;
}
- if( req->status_code == 301 || req->status_code == 302 )
+ if( ( req->status_code == 301 || req->status_code == 302 ) && req->redir_ttl-- > 0 )
{
char *loc, *new_request, *new_host;
int error = 0, new_port, new_proto;
@@ -444,7 +446,7 @@ cleanup:
return FALSE;
}
-void http_free( struct http_request *req )
+static void http_free( struct http_request *req )
{
g_free( req->request );
g_free( req->reply_headers );
diff --git a/lib/http_client.h b/lib/http_client.h
index d73894a4..27c484ff 100644
--- a/lib/http_client.h
+++ b/lib/http_client.h
@@ -60,6 +60,8 @@ struct http_request
int body_size; /* The number of bytes in reply_body. */
int finished; /* Set to non-0 if the request was completed
successfully. */
+ int redir_ttl; /* You can set it to 0 if you don't want
+ http_client to follow them. */
http_input_function func;
gpointer data;
@@ -78,7 +80,5 @@ struct http_request
version is probably only useful if you want to do POST requests or if
you want to add some extra headers. As you can see, HTTPS connections
are also supported (using ssl_client). */
-void *http_dorequest( char *host, int port, int ssl, char *request, http_input_function func, gpointer data );
-void *http_dorequest_url( char *url_string, http_input_function func, gpointer data );
-
-void http_free( struct http_request *req );
+struct http_request *http_dorequest( char *host, int port, int ssl, char *request, http_input_function func, gpointer data );
+struct http_request *http_dorequest_url( char *url_string, http_input_function func, gpointer data );
diff --git a/protocols/oscar/oscar.c b/protocols/oscar/oscar.c
index acae6433..9a9f2999 100644
--- a/protocols/oscar/oscar.c
+++ b/protocols/oscar/oscar.c
@@ -2530,7 +2530,7 @@ struct groupchat *oscar_chat_with(struct im_connection * ic, char *who)
char * chatname;
struct groupchat *c;
- chatname = g_strdup_printf("%s%s_%d", isdigit(*ic->acc->user) ? "icq_" : "",
+ chatname = g_strdup_printf("%s%s%d", isdigit(*ic->acc->user) ? "icq" : "",
ic->acc->user, chat_id++);
c = imcb_chat_new(ic, chatname);
diff --git a/protocols/twitter/twitter_lib.c b/protocols/twitter/twitter_lib.c
index 92c6415f..b4b460d3 100644
--- a/protocols/twitter/twitter_lib.c
+++ b/protocols/twitter/twitter_lib.c
@@ -35,6 +35,14 @@
#include <ctype.h>
#include <errno.h>
+/* GLib < 2.12.0 doesn't have g_ascii_strtoll(), work around using system strtoll(). */
+/* GLib < 2.12.4 can be buggy: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=488013 */
+#if !GLIB_CHECK_VERSION(2,12,5)
+#include <stdlib.h>
+#include <limits.h>
+#define g_ascii_strtoll strtoll
+#endif
+
#define TXL_STATUS 1
#define TXL_USER 2
#define TXL_ID 3
@@ -65,6 +73,8 @@ static void twitter_groupchat_init(struct im_connection *ic);
*/
static void txu_free(struct twitter_xml_user *txu)
{
+ if (txu == NULL)
+ return;
g_free(txu->name);
g_free(txu->screen_name);
g_free(txu);
@@ -88,6 +98,8 @@ static void txs_free(struct twitter_xml_status *txs)
static void txl_free(struct twitter_xml_list *txl)
{
GSList *l;
+ if (txl == NULL)
+ return;
for ( l = txl->list; l ; l = g_slist_next(l) )
if (txl->type == TXL_STATUS)
txs_free((struct twitter_xml_status *)l->data);
@@ -472,6 +484,9 @@ static void twitter_groupchat(struct im_connection *ic, GSList *list)
for ( l = list; l ; l = g_slist_next(l) )
{
status = l->data;
+ if (status->user == NULL || status->text == NULL)
+ continue;
+
twitter_add_buddy(ic, status->user->screen_name, status->user->name);
strip_html(status->text);
@@ -735,4 +750,4 @@ void twitter_friendships_create_destroy(struct im_connection *ic, char *who, int
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
+}
diff --git a/storage_xml.c b/storage_xml.c
index 7a10cea7..db72025d 100644
--- a/storage_xml.c
+++ b/storage_xml.c
@@ -58,6 +58,7 @@ struct xml_parsedata
char *given_nick;
char *given_pass;
xml_pass_st pass_st;
+ int unknown_tag;
};
static char *xml_attr( const gchar **attr_names, const gchar **attr_values, const gchar *key )
@@ -85,7 +86,11 @@ static void xml_start_element( GMarkupParseContext *ctx, const gchar *element_na
struct xml_parsedata *xd = data;
irc_t *irc = xd->irc;
- if( g_strcasecmp( element_name, "user" ) == 0 )
+ if( xd->unknown_tag > 0 )
+ {
+ xd->unknown_tag ++;
+ }
+ else if( g_strcasecmp( element_name, "user" ) == 0 )
{
char *nick = xml_attr( attr_names, attr_values, "nick" );
char *pass = xml_attr( attr_names, attr_values, "password" );
@@ -266,8 +271,15 @@ static void xml_start_element( GMarkupParseContext *ctx, const gchar *element_na
}
else
{
+ xd->unknown_tag ++;
+ irc_usermsg( irc, "Warning: Unknown XML tag found in configuration file (%s). "
+ "This may happen when downgrading BitlBee versions. "
+ "This tag will be skipped and the information will be lost "
+ "once you save your settings.", element_name );
+ /*
g_set_error( error, G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT,
"Unkown element: %s", element_name );
+ */
}
}
@@ -275,7 +287,11 @@ static void xml_end_element( GMarkupParseContext *ctx, const gchar *element_name
{
struct xml_parsedata *xd = data;
- if( g_strcasecmp( element_name, "setting" ) == 0 && xd->current_setting )
+ if( xd->unknown_tag > 0 )
+ {
+ xd->unknown_tag --;
+ }
+ else if( g_strcasecmp( element_name, "setting" ) == 0 && xd->current_setting )
{
g_free( xd->current_setting );
xd->current_setting = NULL;