From df61c35ad36e18965b3b0fdccf0fa830b0768108 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Mon, 30 Aug 2010 21:24:28 +0200 Subject: Warn the user when his/her AIM/ICQ password seems to be too long. For some people with long passwords the removal of old ICQ-only authentication introduced login issues since the extra chars in the password upset the server. --- protocols/oscar/oscar.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'protocols') diff --git a/protocols/oscar/oscar.c b/protocols/oscar/oscar.c index db6a28f4..9283628a 100644 --- a/protocols/oscar/oscar.c +++ b/protocols/oscar/oscar.c @@ -516,6 +516,14 @@ static int gaim_parse_auth_resp(aim_session_t *sess, aim_frame_t *fr, ...) { case 0x05: /* Incorrect nick/password */ imcb_error(ic, _("Incorrect nickname or password.")); + { + int max = od->icq ? 8 : 16; + if (strlen(ic->acc->pass) > max) + imcb_log(ic, "Note that the maximum password " + "length supported by this protocol is " + "%d characters, try logging in using " + "a shorter password.", max); + } // plugin_event(event_error, (void *)980, 0, 0, 0); break; case 0x11: -- cgit v1.2.3 From c55701ecf0b0a9e0c0cb9a4514c90bf426aa5d92 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Mon, 30 Aug 2010 21:58:33 +0200 Subject: Due to popular demand, now using mode=chat by default. --- protocols/twitter/twitter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'protocols') diff --git a/protocols/twitter/twitter.c b/protocols/twitter/twitter.c index d5b71bc3..d5127415 100644 --- a/protocols/twitter/twitter.c +++ b/protocols/twitter/twitter.c @@ -194,7 +194,7 @@ static void twitter_init( account_t *acc ) s = set_add( &acc->set, "message_length", "140", set_eval_int, acc ); - s = set_add( &acc->set, "mode", "one", set_eval_mode, acc ); + s = set_add( &acc->set, "mode", "chat", set_eval_mode, acc ); s->flags |= ACC_SET_OFFLINE_ONLY; s = set_add( &acc->set, "oauth", def_oauth, set_eval_bool, acc ); -- cgit v1.2.3 From 31dbb90a2d32d6988706ae4b5c2292cd43d89595 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Tue, 31 Aug 2010 00:02:46 +0200 Subject: Suppress subjects in Jabber conversations after showing them once. --- protocols/jabber/jabber.h | 2 ++ protocols/jabber/message.c | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'protocols') diff --git a/protocols/jabber/jabber.h b/protocols/jabber/jabber.h index 45a1c5c1..1523e096 100644 --- a/protocols/jabber/jabber.h +++ b/protocols/jabber/jabber.h @@ -58,6 +58,8 @@ typedef enum groupchat state info too. */ JBFLAG_IS_ANONYMOUS = 8, /* For anonymous chatrooms, when we don't have have a real JID. */ + JBFLAG_HIDE_SUBJECT = 16, /* Hide the subject field since we probably + showed it already. */ } jabber_buddy_flags_t; /* Stores a streamhost's (a.k.a. proxy) data */ diff --git a/protocols/jabber/message.c b/protocols/jabber/message.c index 6e40e521..85c71c9d 100644 --- a/protocols/jabber/message.c +++ b/protocols/jabber/message.c @@ -92,9 +92,20 @@ xt_status jabber_pkt_message( struct xt_node *node, gpointer data ) g_string_append_printf( fullmsg, "URL: %s\n", url->text ); } } - else if( ( c = xt_find_node( node->children, "subject" ) ) && c->text_len > 0 ) + else if( ( c = xt_find_node( node->children, "subject" ) ) && c->text_len > 0 && + ( !bud || !( bud->flags & JBFLAG_HIDE_SUBJECT ) ) ) { g_string_append_printf( fullmsg, "<< \002BitlBee\002 - Message with subject: %s >>\n", c->text ); + if( bud ) + bud->flags |= JBFLAG_HIDE_SUBJECT; + } + else if( bud && !c ) + { + /* Yeah, possibly we're hiding changes to this field now. But nobody uses + this for anything useful anyway, except GMail when people reply to an + e-mail via chat, repeating the same subject all the time. I don't want + to have to remember full subject strings for everyone. */ + bud->flags &= ~JBFLAG_HIDE_SUBJECT; } if( body && body->text_len > 0 ) /* Could be just a typing notification. */ -- cgit v1.2.3 From 41e0c00fd22d1cdace2040be5912d64f51f12ab8 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 5 Sep 2010 11:27:12 +0100 Subject: Fixing handling of (Jabber) chatroom topic changes done by the user. --- protocols/jabber/conference.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'protocols') diff --git a/protocols/jabber/conference.c b/protocols/jabber/conference.c index e04b9792..0c2db0b3 100644 --- a/protocols/jabber/conference.c +++ b/protocols/jabber/conference.c @@ -311,6 +311,15 @@ void jabber_chat_pkt_message( struct im_connection *ic, struct jabber_buddy *bud struct jabber_chat *jc = chat ? chat->data : NULL; char *s; + if( subject && chat ) + { + s = bud ? strchr( bud->ext_jid, '/' ) : NULL; + if( s ) *s = 0; + imcb_chat_topic( chat, bud ? bud->ext_jid : NULL, subject->text_len > 0 ? + subject->text : NULL, jabber_get_timestamp( node ) ); + if( s ) *s = '/'; + } + if( bud == NULL || ( jc && ~jc->flags & JCFLAG_MESSAGE_SENT && bud == jc->me ) ) { char *nick; @@ -365,15 +374,6 @@ void jabber_chat_pkt_message( struct im_connection *ic, struct jabber_buddy *bud now or just wait for the OS to do it. :-) */ return; } - - if( subject ) - { - s = strchr( bud->ext_jid, '/' ); - if( s ) *s = 0; - imcb_chat_topic( chat, bud->ext_jid, subject->text_len > 0 ? - subject->text : NULL, jabber_get_timestamp( node ) ); - if( s ) *s = '/'; - } if( body && body->text_len > 0 ) { s = strchr( bud->ext_jid, '/' ); -- cgit v1.2.3 From fef78131a46462ee1d1457aa690c52a52b23151a Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 5 Sep 2010 12:31:22 +0100 Subject: Fix compiler warnings. Also fixing irc_send_motd(), which so far got away with a horrible practice of reading the MOTD file one by one. --- protocols/oscar/ssi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'protocols') diff --git a/protocols/oscar/ssi.c b/protocols/oscar/ssi.c index 76b5b427..f37d98e5 100644 --- a/protocols/oscar/ssi.c +++ b/protocols/oscar/ssi.c @@ -414,7 +414,7 @@ int aim_ssi_cleanlist(aim_session_t *sess, aim_conn_t *conn) for (parentgroup=sess->ssi.items; ((parentgroup) && (parentgroup->type!=AIM_SSI_TYPE_GROUP) && (parentgroup->gid==0x0000)); parentgroup=parentgroup->next); if (!parentgroup) { char *newgroup; - newgroup = (char*)g_malloc(strlen("Unknown")*sizeof(char)); + newgroup = (char*)g_malloc(strlen("Unknown")+1); strcpy(newgroup, "Unknown"); aim_ssi_addgroups(sess, conn, &newgroup, 1); } -- cgit v1.2.3