aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitlbee.h3
-rw-r--r--doc/CHANGES22
-rw-r--r--doc/FAQ19
-rw-r--r--doc/README12
-rw-r--r--doc/user-guide/misc.xml35
-rw-r--r--help.c24
-rw-r--r--help.h1
-rw-r--r--irc.c1
-rw-r--r--irc_channel.c2
-rw-r--r--irc_commands.c1
-rw-r--r--irc_im.c2
-rw-r--r--irc_send.c2
-rw-r--r--motd.txt1
-rw-r--r--protocols/bee_chat.c2
-rw-r--r--protocols/purple/purple.c44
-rw-r--r--protocols/twitter/twitter.c15
-rw-r--r--root_commands.c28
17 files changed, 149 insertions, 65 deletions
diff --git a/bitlbee.h b/bitlbee.h
index a137ae43..0ec6406e 100644
--- a/bitlbee.h
+++ b/bitlbee.h
@@ -136,7 +136,6 @@
#include "conf.h"
#include "log.h"
#include "ini.h"
-#include "help.h"
#include "query.h"
#include "sock.h"
#include "misc.h"
@@ -146,7 +145,7 @@ typedef struct global {
/* In forked mode, child processes store the fd of the IPC socket here. */
int listen_socket;
gint listen_watch_source_id;
- help_t *help;
+ struct help *help;
char *conf_file;
conf_t *conf;
GList *storage; /* The first backend in the list will be used for saving */
diff --git a/doc/CHANGES b/doc/CHANGES
index cfd524dc..cb071e4c 100644
--- a/doc/CHANGES
+++ b/doc/CHANGES
@@ -3,13 +3,11 @@ found in the bzr commit logs, for example you can try:
http://bugs.bitlbee.org/bitlbee/timeline?daysback=90&changeset=on
-Version ...
-- For the first time since 2007, a dev snapshot. Like then, this is pretty
- stable already (running on testing.bitlbee.org for weeks by now), but not
- all planned features for the next major release are ready yet, and there
- may be some rough edges in the interface and documentation.
-- Loads of new stuff, mostly ready for a new major release, but starting with
- a dev snapshot. A few changes that were planned for a long time already:
+Version
+- Important: This version drops backward compatibility with the file format
+ used for user settings in versions before 1.2. If you're upgrading from
+ very old BitlBee versions (like 1.0.x), you'll have to recreate your
+ BitlBee account - or use an 1.2.x BitlBee once to do the conversion.
- Rewrote the IRC core, which brings:
* Support for multiple (control) channels, so you can have one channel per
buddy group, per IM account/protocol, or for example a &offline with all
@@ -62,6 +60,16 @@ Version ...
only the Jabber native protocol module currently supports file transfers.
- Updated Yahoo! module to be in sync again with libyahoo2. This mostly
fixes issues with authorization requests.
+- Show if a contact is mobile or not. See "help set mobile_is_away".
+- Easier handling of XMPP chatroom invitations.
+- The chatroom mode of the Twitter module is now enabled by default, since
+ this was by far the most popular. To disable it, see "help set mode".
+- Added some Twitter-specific commands that can only be used in the Twitter
+ window. Most important addition: Retweets. See "help set commands".
+- Removed some ancient account/nick migration scripts and added one for
+ easier switching from Pidgin and other libpurple-based clients to BitlBee.
+- Many bug fixes in both the core and IM modules, small feature enhancements
+ and other minor changes.
Finished ...
diff --git a/doc/FAQ b/doc/FAQ
index a47e066e..e4fdcaed 100644
--- a/doc/FAQ
+++ b/doc/FAQ
@@ -61,16 +61,11 @@ A: BitlBee 0.7 was, sort-of. It contained a lot of code from Gaim 0.58
These days, we replaced the Yahoo! code with libyahoo2 (which is a
separate Yahoo! module. It's derived from Gaim, but separately
- maintained) and wrote our own MSN module. More modules are probably going
- to be changed, so in the near future, the API might be the only thing
- left from Gaim.
-
-Q: What's that Gaim doing in BitlBee error messages and my Jabber resource?
-A: Ah, well, as you probably know we use some of Gaim's IM-modules, and we
- don't think it's worth our time to do a search-and-replace over the whole
- source to get rid of every reference to Gaim. In fact, we don't want to,
- since we don't want to pretend we wrote all that code.
+ maintained) and wrote our own MSN, Jabber and Twitter modules from
+ scratch. Most of the API has also been changed, so by now the only traces
+ of Gaim left are in the "nogaim" filename.
- About Jabber: If you want a different resource string, you can set it
- when logging in by appending it to your Jabber ID, like:
- lintux@jabber.com/BitlBee
+ There is good news for Gaim (or now Pidgin, of course) fans though:
+ BitlBee can now be compiled to use libpurple for all IM interactions.
+ This makes BitlBee a bit more resource-hungry, but adds support for many
+ IM protocols/networks that couldn't be used from BitlBee so far.
diff --git a/doc/README b/doc/README
index 0ccd1d3d..d5d4d1c9 100644
--- a/doc/README
+++ b/doc/README
@@ -66,12 +66,12 @@ DEPENDENCIES
BitlBee's only real dependency is GLib. This is available on virtually every
platform. Any recent version of GLib (2.4 or higher) will work.
-These days, MSN Messenger clients have to connect to the MS Passport servers
-through HTTPS. BitlBee can use several SSL libraries for this: GnuTLS, NSS
-(which comes with Mozilla) and OpenSSL. OpenSSL is not GPL-compatible in some
-situations, so using GnuTLS or NSS is preferred. However, especially on *BSD,
-OpenSSL can be considered part of the operating system, which eliminates the
-GPL incompatibility.
+These days, many IM protocols use SSL/TLS connections (for authentication
+or for the whole session). BitlBee can use several SSL libraries for this:
+GnuTLS, NSS (which comes with Mozilla) and OpenSSL. OpenSSL is not GPL-
+compatible in some situations, so using GnuTLS is preferred. However,
+especially on *BSD, OpenSSL can be considered part of the operating system,
+which eliminates the GPL incompatibility.
The incompatibility is also the reason why the SSL library detection code
doesn't attempt to use OpenSSL. If you want to use OpenSSL, you have to
diff --git a/doc/user-guide/misc.xml b/doc/user-guide/misc.xml
index 979ad026..906b312e 100644
--- a/doc/user-guide/misc.xml
+++ b/doc/user-guide/misc.xml
@@ -267,10 +267,43 @@ everything in the handle up to the first @.
</sect1>
-<sect1 id="news1.3">
+<sect1 id="whatsnew010206">
+<title>New stuff in BitlBee 1.2.6</title>
+
+<para>
+Twitter support. See <emphasis>help account add twitter</emphasis>.
+</para>
+</sect1>
+
+<sect1 id="whatsnew010300">
<title>New stuff in BitlBee 1.3dev</title>
<para>
+Support for multiple configurable control channels, each with a subset of
+your contact list. See <emphasis>help channels</emphasis> for more
+information.
+</para>
+
+<para>
+File transfer support for some protocols (more if you use libpurple). Just
+/DCC SEND stuff. Incoming files also become DCC transfers.
+</para>
+
+<para>
+Only if you run your own BitlBee instance: You can build a BitlBee that uses
+libpurple for connecting to IM networks instead of its own code, adding
+support for some of the more obscure IM protocols and features.
+</para>
+
+<para>
+Many more things, briefly described in <emphasis>help news1.3</emphasis>.
+</para>
+</sect1>
+
+<sect1 id="news1.3">
+<title>New stuff in BitlBee 1.3dev (details)</title>
+
+<para>
Most of the core of BitlBee was rewritten since the last release. This entry
should sum up the majority of the changes.
</para>
diff --git a/help.c b/help.c
index 14156eaf..86013cb3 100644
--- a/help.c
+++ b/help.c
@@ -1,7 +1,7 @@
/********************************************************************\
* BitlBee -- An IRC to other IM-networks gateway *
* *
- * Copyright 2002-2009 Wilmer van der Gaast and others *
+ * Copyright 2002-2010 Wilmer van der Gaast and others *
\********************************************************************/
/* Help file control */
@@ -25,6 +25,7 @@
#define BITLBEE_CORE
#include "bitlbee.h"
+#include "help.h"
#undef read
#undef write
@@ -193,3 +194,24 @@ int help_add_mem( help_t **help, const char *title, const char *content )
return 1;
}
+
+char *help_get_whatsnew( help_t **help, int old )
+{
+ GString *ret = NULL;
+ help_t *h;
+ int v;
+
+ for( h = *help; h; h = h->next )
+ if( h->title != NULL && strncmp( h->title, "whatsnew", 8 ) == 0 &&
+ sscanf( h->title + 8, "%x", &v ) == 1 && v > old )
+ {
+ char *s = help_get( &h, h->title );
+ if( ret == NULL )
+ ret = g_string_new( s );
+ else
+ g_string_append_printf( ret, "\n\n%s", s );
+ g_free( s );
+ }
+
+ return ret ? g_string_free( ret, FALSE ) : NULL;
+}
diff --git a/help.h b/help.h
index e689a93d..9f4d1572 100644
--- a/help.h
+++ b/help.h
@@ -46,5 +46,6 @@ G_GNUC_MALLOC help_t *help_init( help_t **help, const char *helpfile );
void help_free( help_t **help );
char *help_get( help_t **help, char *title );
int help_add_mem( help_t **help, const char *title, const char *content_ );
+char *help_get_whatsnew( help_t **help, int old );
#endif
diff --git a/irc.c b/irc.c
index 836d5f81..b18ee612 100644
--- a/irc.c
+++ b/irc.c
@@ -111,6 +111,7 @@ irc_t *irc_new( int fd )
s = set_add( &b->set, "handle_unknown", "add_channel", NULL, irc );
s = set_add( &b->set, "last_version", NULL, NULL, irc );
s->flags |= SET_HIDDEN;
+ s->value = g_strdup_printf( "%d", BITLBEE_VERSION_CODE );
s = set_add( &b->set, "lcnicks", "true", set_eval_bool, irc );
s = set_add( &b->set, "nick_format", "%-@nick", NULL, irc );
s = set_add( &b->set, "offline_user_quits", "true", set_eval_bool, irc );
diff --git a/irc_channel.c b/irc_channel.c
index 80b1cb62..60426ac0 100644
--- a/irc_channel.c
+++ b/irc_channel.c
@@ -191,7 +191,7 @@ static char *set_eval_channel_type( set_t *set, char *value )
if( strcmp( value, "control" ) == 0 )
new = &control_channel_funcs;
- else if( strcmp( value, "chat" ) == 0 )
+ else if( ic != ic->irc->default_channel && strcmp( value, "chat" ) == 0 )
new = &irc_channel_im_chat_funcs;
else
return SET_INVALID;
diff --git a/irc_commands.c b/irc_commands.c
index 7874f519..ce276051 100644
--- a/irc_commands.c
+++ b/irc_commands.c
@@ -25,6 +25,7 @@
#define BITLBEE_CORE
#include "bitlbee.h"
+#include "help.h"
#include "ipc.h"
static void irc_cmd_pass( irc_t *irc, char **cmd )
diff --git a/irc_im.c b/irc_im.c
index 7fa70350..6c8b7f70 100644
--- a/irc_im.c
+++ b/irc_im.c
@@ -529,7 +529,7 @@ static gboolean bee_irc_chat_remove_user( bee_t *bee, struct groupchat *c, bee_u
irc_t *irc = bee->ui_data;
irc_channel_t *ic = c->ui_data;
- if( ic == NULL )
+ if( ic == NULL || bu == NULL )
return FALSE;
/* TODO: Possible bug here: If a module removes $user here instead of just
diff --git a/irc_send.c b/irc_send.c
index 791ecc75..c992dae1 100644
--- a/irc_send.c
+++ b/irc_send.c
@@ -113,7 +113,7 @@ void irc_usermsg( irc_t *irc, char *format, ... )
{
irc_channel_t *ic = NULL;
irc_user_t *iu = irc->root;
- char text[1024];
+ char text[1100];
va_list params;
char *dst;
diff --git a/motd.txt b/motd.txt
index a15067ab..9e854d54 100644
--- a/motd.txt
+++ b/motd.txt
@@ -16,4 +16,3 @@ The developers of the Bee hope you have a buzzing time.
* BitlBee development team: wilmer, jelmer, Maurits
... Buzzing, haha, get it?
-% \ No newline at end of file
diff --git a/protocols/bee_chat.c b/protocols/bee_chat.c
index 0314cae5..349e0547 100644
--- a/protocols/bee_chat.c
+++ b/protocols/bee_chat.c
@@ -195,7 +195,7 @@ void imcb_chat_remove_buddy( struct groupchat *c, const char *handle, const char
bu = bee_user_by_handle( bee, ic, handle );
}
- if( bee->ui->chat_remove_user )
+ if( bee->ui->chat_remove_user && bu )
bee->ui->chat_remove_user( bee, c, bu );
}
diff --git a/protocols/purple/purple.c b/protocols/purple/purple.c
index 5522c0fc..d38f99fb 100644
--- a/protocols/purple/purple.c
+++ b/protocols/purple/purple.c
@@ -79,6 +79,28 @@ static void purple_init( account_t *acc )
set_t *s;
char help_title[64];
GString *help;
+ static gboolean dir_fixed = FALSE;
+
+ /* Layer violation coming up: Making an exception for libpurple here.
+ Dig in the IRC state a bit to get a username. Ideally we should
+ check if s/he identified but this info doesn't seem *that* important.
+ It's just that fecking libpurple can't *not* store this shit.
+
+ Remember that libpurple is not really meant to be used on public
+ servers anyway! */
+ if( !dir_fixed )
+ {
+ irc_t *irc = acc->bee->ui_data;
+ char *dir;
+
+ dir = g_strdup_printf( "%s/purple/%s", global.conf->configdir, irc->user->nick );
+ purple_util_set_user_dir( dir );
+ g_free( dir );
+
+ purple_blist_load();
+ purple_prefs_load();
+ dir_fixed = TRUE;
+ }
help = g_string_new( "" );
g_string_printf( help, "BitlBee libpurple module %s (%s).\n\nSupported settings:",
@@ -253,7 +275,8 @@ static void purple_login( account_t *acc )
struct im_connection *ic = imcb_new( acc );
PurpleAccount *pa;
- if( local_bee != NULL && local_bee != acc->bee )
+ if( ( local_bee != NULL && local_bee != acc->bee ) ||
+ ( global.conf->runmode == RUNMODE_DAEMON && !getenv( "BITLBEE_DEBUG" ) ) )
{
imcb_error( ic, "Daemon mode detected. Do *not* try to use libpurple in daemon mode! "
"Please use inetd or ForkDaemon mode instead." );
@@ -351,6 +374,9 @@ static char *set_eval_display_name( set_t *set, char *value )
account_t *acc = set->data;
struct im_connection *ic = acc->ic;
+ if( ic )
+ imcb_log( ic, "Changing display_name not currently supported with libpurple!" );
+
return NULL;
}
@@ -516,7 +542,7 @@ void purple_chat_leave( struct groupchat *gc )
purple_conversation_destroy( pc );
}
-struct groupchat *purple_chat_join( struct im_connection *ic, const char *room, const char *nick, const char *password )
+struct groupchat *purple_chat_join( struct im_connection *ic, const char *room, const char *nick, const char *password, set_t **sets )
{
PurpleAccount *pa = ic->proto_data;
PurplePlugin *prpl = purple_plugins_find_with_id( pa->protocol_id );
@@ -1131,6 +1157,7 @@ void purple_initmodule()
struct prpl funcs;
GList *prots;
GString *help;
+ char *dir;
if( B_EV_IO_READ != PURPLE_INPUT_READ ||
B_EV_IO_WRITE != PURPLE_INPUT_WRITE )
@@ -1139,7 +1166,10 @@ void purple_initmodule()
exit( 1 );
}
- purple_util_set_user_dir( "/tmp" );
+ dir = g_strdup_printf( "%s/purple", global.conf->configdir );
+ purple_util_set_user_dir( dir );
+ g_free( dir );
+
purple_debug_set_enabled( FALSE );
purple_core_set_ui_ops( &bee_core_uiops );
purple_eventloop_set_ui_ops( &glib_eventloops );
@@ -1150,12 +1180,7 @@ void purple_initmodule()
abort();
}
- /* This seems like stateful shit we don't want... */
purple_set_blist( purple_blist_new() );
- purple_blist_load();
-
- /* Meh? */
- purple_prefs_load();
/* No, really. So far there were ui_ops for everything, but now suddenly
one needs to use signals for typing notification stuff. :-( */
@@ -1220,7 +1245,8 @@ void purple_initmodule()
}
g_string_append( help, "\n\nFor used protocols, more information about available "
- "settings can be found using \x02help purple <protocol name>\x02" );
+ "settings can be found using \x02help purple <protocol name>\x02 "
+ "(create an account using that protocol first!)" );
/* Add a simple dynamically-generated help item listing all
the supported protocols. */
diff --git a/protocols/twitter/twitter.c b/protocols/twitter/twitter.c
index d5127415..7a49c084 100644
--- a/protocols/twitter/twitter.c
+++ b/protocols/twitter/twitter.c
@@ -28,6 +28,16 @@
#include "twitter_lib.h"
#include "url.h"
+#define twitter_msg( ic, fmt... ) \
+ do { \
+ struct twitter_data *td = ic->proto_data; \
+ if( td->home_timeline_gc ) \
+ imcb_chat_log( td->home_timeline_gc, fmt ); \
+ else \
+ imcb_log( ic, fmt ); \
+ } while( 0 );
+
+
/**
* Main loop function
*/
@@ -435,6 +445,8 @@ static void twitter_handle_command( struct im_connection *ic, char *message )
/* TODO: User feedback. */
if( id )
twitter_status_destroy( ic, id );
+ else
+ twitter_msg( ic, "Could not undo last action" );
g_free( cmds );
return;
@@ -466,6 +478,9 @@ static void twitter_handle_command( struct im_connection *ic, char *message )
td->last_status_id = 0;
if( id )
twitter_status_retweet( ic, id );
+ else
+ twitter_msg( ic, "User `%s' does not exist or didn't "
+ "post any statuses recently", cmd[1] );
g_free( cmds );
return;
diff --git a/root_commands.c b/root_commands.c
index 94d22933..f3186562 100644
--- a/root_commands.c
+++ b/root_commands.c
@@ -1292,37 +1292,21 @@ static void cmd_nick( irc_t *irc, char **cmd )
static void bitlbee_whatsnew( irc_t *irc )
{
int last = set_getint( &irc->b->set, "last_version" );
- GString *msg = g_string_new( "" );
- char s[16];
+ char s[16], *msg;
if( last >= BITLBEE_VERSION_CODE )
return;
- if( last < 0x010206 ) /* 1.2.6 */
- {
- g_string_append( msg,
- "Twitter support. See \x02help account add twitter\x02.\n" );
- }
- if( last < 0x010300 ) /* 1.3dev */
- {
- g_string_append( msg,
- "Support for multiple configurable control channels, "
- "each with a subset of your contact list. See "
- "\x02help channels\x02 for more information.\n"
- "File transfer support for some protocols (more if "
- "you use libpurple). Just /DCC SEND stuff. Incoming "
- "files also become DCC transfers.\n"
- "Many more things, briefly described in "
- "\x02help news1.3\x02.\n" );
- }
+ msg = help_get_whatsnew( &(global.help), last );
- if( msg->len > 0 )
+ if( msg )
irc_usermsg( irc, "%s: This seems to be your first time using this "
"this version of BitlBee. Here's a list of new "
"features you may like to know about:\n\n%s\n",
- irc->user->nick, msg->str );
+ irc->user->nick, msg );
+
+ g_free( msg );
- g_string_free( msg, TRUE );
g_snprintf( s, sizeof( s ), "%d", BITLBEE_VERSION_CODE );
set_setstr( &irc->b->set, "last_version", s );
}